diff --git "a/datasets/olds/chameleon_shop_dataset20230530-1918.csv.bak" "b/datasets/olds/chameleon_shop_dataset20230530-1918.csv.bak" deleted file mode 100644--- "a/datasets/olds/chameleon_shop_dataset20230530-1918.csv.bak" +++ /dev/null @@ -1,41505 +0,0 @@ -classname,description,code -maps,* util class maps amazon data to local representations.,"public function convertLocalToOrderAddress($targetAddressType, array $localAddress) - { - $prefix = (self::ORDER_ADDRESS_TYPE_BILLING === $targetAddressType) ? 'adr_billing_' : 'adr_shipping_'; - $orderAdr = array( - $prefix.'company' => '', - $prefix.'salutation_id' => '', - $prefix.'firstname' => '', - $prefix.'lastname' => '', - $prefix.'street' => '', - $prefix.'streetnr' => '', - $prefix.'city' => '', - $prefix.'postalcode' => '', - $prefix.'country_id' => '', - $prefix.'telefon' => '', - $prefix.'fax' => '', - $prefix.'additional_info' => '', - ); - foreach ($localAddress as $field => $value) { - if ('data_country_id' === $field) { - $field = 'country_id'; - }" -maps,"* @param int $targetAddressType - one of ORDER_ADDRESS_TYPE_* - * @param array $localAddress - * - * @return array","public function convertAddressFromAmazonToLocal(array $address, $targetAddressType) - { - $mapping = array( - 'Name' => 'lastname', - 'AddressLine1' => 'company', - 'AddressLine2' => 'street', - 'AddressLine3' => 'address_additional_info', - 'County' => null, - 'District' => null, - 'StateOrRegion' => null, - 'City' => 'city', - 'PostalCode' => 'postalcode', - 'Phone' => 'telefon', - 'CountryCode' => 'data_country_id', - ); - - foreach (array_keys($address) as $field) { - if (false === array_key_exists($field, $mapping)) { - throw new InvalidArgumentException( - 'invalid field '.$field.' (valid fields are: ""'.implode( - '"", ""', - array_keys($mapping) - ).'"")' - ); - }" -maps,"* @param array $address - * @param int $targetAddressType - * - * @return array - * - * @throws InvalidArgumentException","public function convertAddressFromAmazonObjectToLocal(OffAmazonPaymentsService_Model_Address $address, $targetAddressType) - { - return $this->convertAddressFromAmazonToLocal( - array( - 'Name' => $address->getName(), - 'AddressLine1' => $address->getAddressLine1(), - 'AddressLine2' => $address->getAddressLine2(), - 'AddressLine3' => $address->getAddressLine3(), - 'County' => $address->getCounty(), - 'District' => $address->getDistrict(), - 'StateOrRegion' => $address->getStateOrRegion(), - 'City' => $address->getCity(), - 'PostalCode' => $address->getPostalCode(), - 'Phone' => $address->getPhone(), - 'CountryCode' => $address->getCountryCode(), - ), - $targetAddressType - ); - }" -maps,"* code from amazon to convert address lines to company postbox and street - * for countries AT nad DE only. - * - * @param array $localAddressData - * @param array $address - * - * @return array","public function getCountryIdFromAmazonCountryCode($amazonCountryCode, $targetAddressType) - { - $countryObject = TdbDataCountry::GetInstanceForIsoCode($amazonCountryCode); - if (null === $countryObject || false === $this->isCountryForAddressTypeActive($countryObject, $targetAddressType)) { - throw new InvalidArgumentException('country code '.$amazonCountryCode.' is not supported'); - }" -AmazonOrderReferenceObject,* Class AmazonOrderReference.,"public function __construct( - AmazonPaymentGroupConfig $config, - $amazonOrderReferenceId, - LoggerInterface $logger = null - ) { - $this->config = $config; - $this->amazonOrderReferenceId = $amazonOrderReferenceId; - $this->converter = new AmazonDataConverter(); - $this->logger = $logger; - }" -AmazonOrderReferenceObject,* @var AmazonPaymentGroupConfig,"public function setOrderReferenceOrderValue($orderValue) - { - $request = new \OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest(); - $request->setSellerId($this->config->getMerchantId()); - $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); - - $request->setOrderReferenceAttributes(new \OffAmazonPaymentsService_Model_OrderReferenceAttributes()); - $request->getOrderReferenceAttributes()->setPlatformId($this->config->getPlatformId()); - $request->getOrderReferenceAttributes()->setOrderTotal(new \OffAmazonPaymentsService_Model_OrderTotal()); - - $request->getOrderReferenceAttributes()->getOrderTotal()->setCurrencyCode('EUR'); - - $request->getOrderReferenceAttributes()->getOrderTotal()->setAmount($orderValue); - - $orderReferenceDetails = null; - - // set order reference details - try { - $response = $this->config->getAmazonAPI()->setOrderReferenceDetails($request); - /** @var \OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult $result */ - $result = $response->getSetOrderReferenceDetailsResult(); - /** @var \OffAmazonPaymentsService_Model_OrderReferenceDetails $orderReferenceDetails */ - $orderReferenceDetails = $result->getOrderReferenceDetails(); - $this->logApiCall($request, $response); - }" -AmazonOrderReferenceObject,* @var string,"public function setOrderReferenceDetails(\TdbShopOrder $order) - { - if ($order->getAmazonOrderReferenceId() !== $this->amazonOrderReferenceId) { - throw new \TPkgCmsException_Log(""amazonOrderReferenceId passed via order ({$order->getAmazonOrderReferenceId( - )}" -AmazonOrderReferenceObject,* @var AmazonDataConverter|null,"public function confirmOrderReference() - { - $request = new \OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest(); - $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); - $request->setSellerId($this->config->getMerchantId()); - - try { - $response = $this->config->getAmazonAPI()->confirmOrderReference($request); - $this->logApiCall($request, $response); - }" -AmazonOrderReferenceObject,* @var LoggerInterface|null,"public function authorize(\TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous) - { - $request = new \OffAmazonPaymentsService_Model_AuthorizeRequest(); - $request->setAuthorizationReferenceId($localAuthorizationReferenceId); - $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); - $request->setAuthorizationAmount(new \OffAmazonPaymentsService_Model_Price()); - $request->getAuthorizationAmount()->setAmount($amount); - - if (method_exists($order, 'GetFieldPkgShopCurrency')) { - $currency = $order->GetFieldPkgShopCurrency(); - $request->getAuthorizationAmount()->setCurrencyCode($currency->fieldIso4217); - }" -AmazonOrderReferenceObject,* {@inheritdoc},"public function authorizeAndCapture( - \TdbShopOrder $order, - $localAuthorizationReferenceId, - $amount, - $synchronous, - $invoiceNumber = null - ) { - $request = new \OffAmazonPaymentsService_Model_AuthorizeRequest(); - $request->setAuthorizationReferenceId($localAuthorizationReferenceId); - $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); - $request->setAuthorizationAmount(new \OffAmazonPaymentsService_Model_Price()); - $request->getAuthorizationAmount()->setAmount($amount); - - if (method_exists($order, 'GetFieldPkgShopCurrency')) { - $currency = $order->GetFieldPkgShopCurrency(); - $request->getAuthorizationAmount()->setCurrencyCode($currency->fieldIso4217); - }" -AmazonOrderReferenceObject,"* @param float $orderValue - * - * @return \OffAmazonPaymentsService_Model_OrderReferenceDetails|null - * - * @throws TPkgCmsException_LogAndMessage","public function captureExistingAuthorization( - \TdbShopOrder $order, - $amazonAuthorizationId, - $localCaptureReferenceId, - $amount, - $invoiceNumber = null - ) { - $request = new \OffAmazonPaymentsService_Model_CaptureRequest(); - $request->setCaptureAmount(new \OffAmazonPaymentsService_Model_Price()); - $request->getCaptureAmount()->setAmount($amount); - $request->getCaptureAmount()->setCurrencyCode('EUR'); - $request->setSoftDescriptor($this->config->getSoftDescriptor($order, $invoiceNumber)); - $request->setSellerCaptureNote($this->config->getSellerOrderNote($order)); - $request->setAmazonAuthorizationId($amazonAuthorizationId); - $request->setCaptureReferenceId($localCaptureReferenceId); - $request->setSellerId($this->config->getMerchantId()); - - try { - $response = $this->config->getAmazonAPI()->capture($request); - $details = $response->getCaptureResult()->getCaptureDetails(); - // check state - if (self::STATUS_CAPTURE_DECLINED === $details->getCaptureStatus()->getState()) { - $this->logApiError($request, $response); - throw new AmazonCaptureDeclinedException($details->getCaptureStatus()->getReasonCode(), - array( - 'reasonCode' => $details->getCaptureStatus()->getReasonCode(), - 'reasonDescription' => $details->getCaptureStatus()->getReasonDescription(), - ), - ""capture for order {$order->id}" -AmazonOrderReferenceObject,@var \OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult $result,"public function refund( - \TdbShopOrder $order, - $amazonCaptureId, - $localRefundReferenceId, - $amount, - $invoiceNumber = null, - $sellerRefundNote = null - ) { - $request = new \OffAmazonPaymentsService_Model_RefundRequest(); - $request->setSellerId($this->config->getMerchantId()); - - $request->setAmazonCaptureId($amazonCaptureId); - $request->setRefundReferenceId($localRefundReferenceId); - - $request->setRefundAmount(new \OffAmazonPaymentsService_Model_Price()); - $request->getRefundAmount()->setAmount($amount); - $request->getRefundAmount()->setCurrencyCode('EUR'); - - $request->setSoftDescriptor($this->config->getSoftDescriptor($order, $invoiceNumber)); - $request->setSellerRefundNote($sellerRefundNote); - - try { - $response = $this->config->getAmazonAPI()->refund($request); - $details = $response->getRefundResult()->getRefundDetails(); - if (self::STATUS_REFUND_DECLINED === $details->getRefundStatus()->getState()) { - $this->logApiError($request, $response); - throw new AmazonRefundDeclinedException($details->getRefundStatus()->getReasonCode(), - array( - 'reasonCode' => $details->getRefundStatus()->getReasonCode(), - 'reasonDescription' => $details->getRefundStatus()->getReasonDescription(), - ), - ""refund for order {$order->id}" -AmazonOrderReferenceObject,@var \OffAmazonPaymentsService_Model_OrderReferenceDetails $orderReferenceDetails,"public function getOrderReferenceDetails(array $constraintsThatShouldBeIgnored = null) - { - if (null !== $constraintsThatShouldBeIgnored) { - $allowedConstraints = array( - self::CONSTRAINT_AMOUNT_NOT_SET, - self::CONSTRAINT_PAYMENT_PLAN_NOT_SET, - self::CONSTRAINT_SHIPPING_ADDRESS_NOT_SET, - self::CONSTRAINT_UNKNOWN, - ); - foreach ($constraintsThatShouldBeIgnored as $ignoreConstraint) { - if (false === in_array($ignoreConstraint, $allowedConstraints)) { - throw new \InvalidArgumentException(""you are trying to ignore an unknown constraint [{$ignoreConstraint}" -AmazonOrderReferenceObject,* {@inheritdoc},"public function getAuthorizationDetails($amazonAuthorizationId) - { - $request = new \OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); - $request->setSellerId($this->config->getMerchantId()); - $request->setAmazonAuthorizationId($amazonAuthorizationId); - - try { - $response = $this->config->getAmazonAPI()->getAuthorizationDetails($request); - $this->logApiCall($request, $response); - - return $response->getGetAuthorizationDetailsResult()->getAuthorizationDetails(); - }" -AmazonOrderReferenceObject,@var \OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult $result,"public function getCaptureDetails($amazonCaptureId) - { - $request = new \OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); - $request->setSellerId($this->config->getMerchantId()); - $request->setAmazonCaptureId($amazonCaptureId); - try { - $response = $this->config->getAmazonAPI()->getCaptureDetails($request); - $this->logApiCall($request, $response); - - return $response->getGetCaptureDetailsResult()->getCaptureDetails(); - }" -AmazonOrderReferenceObject,@var \OffAmazonPaymentsService_Model_OrderReferenceDetails $orderReferenceDetails,"public function getRefundDetails($amazonRefundId) - { - $request = new \OffAmazonPaymentsService_Model_GetRefundDetailsRequest(); - $request->setSellerId($this->config->getMerchantId()); - $request->setAmazonRefundId($amazonRefundId); - try { - $response = $this->config->getAmazonAPI()->getRefundDetails($request); - $this->logApiCall($request, $response); - - return $response->getGetRefundDetailsResult()->getRefundDetails(); - }" -AmazonOrderReferenceObject,* {@inheritdoc},"public function cancelOrderReference($cancellationReason = null) - { - $request = new \OffAmazonPaymentsService_Model_CancelOrderReferenceRequest(); - $request->setSellerId($this->config->getMerchantId()); - $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); - if (null !== $cancellationReason) { - $cancellationReason = mb_substr($cancellationReason, 0, 1024); - $request->setCancelationReason($cancellationReason); - }" -AmazonOrderReferenceObject,* {@inheritdoc},"public function closeOrderReference($closureReason = null) - { - $request = new \OffAmazonPaymentsService_Model_CloseOrderReferenceRequest(); - $request->setSellerId($this->config->getMerchantId()); - $request->setAmazonOrderReferenceId($this->amazonOrderReferenceId); - if (null !== $closureReason) { - $closureReason = mb_substr($closureReason, 0, 1024); - $request->setClosureReason($closureReason); - }" -AmazonOrderReferenceObject,* {@inheritdoc},"public function closeAuthorization($amazonAuthorizationId, $closureReason = null) - { - $request = new \OffAmazonPaymentsService_Model_CloseAuthorizationRequest(); - $request->setSellerId($this->config->getMerchantId()); - $request->setAmazonAuthorizationId($amazonAuthorizationId); - if (null !== $closureReason) { - $closureReason = mb_substr($closureReason, 0, 1024); - $request->setClosureReason($closureReason); - }" -AmazonOrderReferenceObject,* {@inheritdoc},"public function findBestCaptureMatchForRefund(AmazonReferenceIdList $captureIdList, $refundValue) - { - $captureCandidateList = array(); - - $amazonCaptureIdListToCheck = array(); - /** @var $item IAmazonReferenceId */ - foreach ($captureIdList->getIterator() as $item) { - $amazonCaptureIdListToCheck[] = $item->getAmazonId(); - }" -AmazonPayment,* auth mode.,"public function __construct(\IPkgShopOrderPaymentConfig $config) - { - if (false === ($config instanceof AmazonPaymentGroupConfig)) { - throw new \InvalidArgumentException('AmazonPayment expects an instance of AmazonPaymentConfig'); - }" -AmazonPayment,* @var AmazonPaymentGroupConfig,"public function updateWithSelectedShippingAddress(\TShopBasket $basket, \TdbDataExtranetUser $user) - { - $amazonOrderRef = $this->config->amazonOrderReferenceObjectFactory($basket->getAmazonOrderReferenceId()); - - $details = $amazonOrderRef->getOrderReferenceDetails( - array( - AmazonOrderReferenceObject::CONSTRAINT_AMOUNT_NOT_SET, - AmazonOrderReferenceObject::CONSTRAINT_PAYMENT_PLAN_NOT_SET, - AmazonOrderReferenceObject::CONSTRAINT_UNKNOWN, - ) - ); - - /** @var \OffAmazonPaymentsService_Model_Destination $destination */ - $destination = $details->getDestination(); - /** @var \OffAmazonPaymentsService_Model_Address $physicalDestination */ - $physicalDestination = $destination->getPhysicalDestination(); - - $countryId = null; - $countryCode = $physicalDestination->getCountryCode(); - try { - $countryId = $this->converter->getCountryIdFromAmazonCountryCode($countryCode, AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING); - }" -AmazonPayment,* @var AmazonDataConverter,"public function captureOrder(\TPkgShopPaymentTransactionManager $transactionManager, \TdbShopOrder $order) - { - $transaction = null; - - $amazonOrderRef = $this->config->amazonOrderReferenceObjectFactory($order->getAmazonOrderReferenceId()); - $amazonOrderRef->setOrderReferenceDetails($order); - $amazonOrderRef->confirmOrderReference(); - - // add catch block so we can cancel the order with amazon if anything goes wrong after the confirm - try { - // update order shipping address - $this->updateOrderWithAmazonDataBeforeAuthorize($amazonOrderRef->getOrderReferenceDetails(), $order); - - // auth / auth + capture - - $authWithCapture = array(); - $authNoCapture = array(); - $orderItems = $order->GetFieldShopOrderItemList(); - while ($item = $orderItems->Next()) { - // if we are to capture on order completion, then every time is in the capture list - if (false === $this->config->isCaptureOnShipment()) { - $authWithCapture[$item->id] = $item->fieldOrderAmount; - continue; - }" -AmazonPayment,* @var Connection,"public function captureShipment( - \TPkgShopPaymentTransactionManager $transactionManager, - \TdbShopOrder $order, - $value, - $invoiceNumber = null, - array $orderItemList = null - ) { - $idManager = $this->getAmazonIdReferenceManager($order); - $amazonOrderRefObject = $this->config->amazonOrderReferenceObjectFactory( - $idManager->getAmazonOrderReferenceId() - ); - - $authIdList = $idManager->getListOfAuthorizations(); - - $transactionData = $transactionManager->getTransactionDataFromOrder( - \TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_PAYMENT, - $orderItemList - ); - $transactionData->setContext( - new \TPkgShopPaymentTransactionContext('captureShipment for invoice '.((null !== $invoiceNumber) ? $invoiceNumber : 'null')) - ); - - $transactionData->setTotalValue($value); - - if (null === $authIdList) { - return $this->captureShipmentViaNewAuthCaptureNow( - $transactionManager, - $transactionData, - $order, - $value, - $amazonOrderRefObject, - $idManager, - $invoiceNumber - ); - }" -AmazonPayment,"* @param \IPkgShopOrderPaymentConfig $config - * - * @throws \InvalidArgumentException","public function refund( - \TPkgShopPaymentTransactionManager $transactionManager, - \TdbShopOrder $order, - $value, - $invoiceNumber = null, - $sellerRefundNote = null, - array $orderItemList = null - ) { - $idManager = $this->getAmazonIdReferenceManager($order); - - $amazonOrderReferenceObject = $this->config->amazonOrderReferenceObjectFactory( - $order->getAmazonOrderReferenceId() - ); - - $refundableCaptures = $amazonOrderReferenceObject->findBestCaptureMatchForRefund( - $idManager->getListOfCaptures(), - $value - ); - - if (0 === count($refundableCaptures)) { - $idListChecked = array(); - /** @var $captureIdChecked AmazonReferenceId */ - foreach ($idManager->getListOfCaptures() as $captureIdChecked) { - $idListChecked[] = $captureIdChecked->getAmazonId(); - }" -AmazonPayment,"* @param \TShopBasket $basket - * @param \TdbDataExtranetUser $user The user whose shipping and billing address is to be set. Note that the user object will be changed in memory, but not persistent. - * - * @throws \TPkgCmsException_LogAndMessage","public function cancelOrder( - \TPkgShopPaymentTransactionManager $transactionManager, - \TdbShopOrder $order, - $cancellationReason = null - ) { - $amazonOrderReference = $this->config->amazonOrderReferenceObjectFactory($order->getAmazonOrderReferenceId()); - - $amazonOrderReference->cancelOrderReference($cancellationReason); - }" -AmazonPayment,@var \OffAmazonPaymentsService_Model_Destination $destination,"public function setConverter($converter) - { - $this->converter = $converter; - }" -AmazonPayment,@var \OffAmazonPaymentsService_Model_Address $physicalDestination,"public function setDb($db) - { - $this->db = $db; - }" -AmazonPayment,"* if capture on shipping is active, then it will - * * auth + capture all downloads plus create a transaction for this value - * * auth remaining value - * if capture on shipping is disabled, then it will - * * auth + capture the order value + create a matching transaction. - * - * the order object is marked as canceled whenever there is an error and NO payment has been executed (no auth and no capture) - * if there is an error after a successful auth or capture, then an exception will be thrown but the order is NOT marked as canceled - * so make sure to use this to decided what to show the user (the user should see the thank you page, with the error message plus the shop - * owner should be notified) - * - * note that auth+capture is always called first. so if that fails, then the order is canceled as well (since there are no open auth after on the order) - * - * should the amazon order object have benn confirmed and then we get an exception, then we will try to cancel the order object as well - * - * {@inheritdoc}","public function getDb() - { - if (null === $this->db) { - $this->db = \ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection'); - }" -AmazonPaymentConfigFactory,* @var LoggerInterface,"public function __construct(LoggerInterface $logger, ShopPaymentConfigLoaderInterface $shopPaymentConfigLoader, ConfigValidator $configValidator) - { - $this->logger = $logger; - $this->shopPaymentConfigLoader = $shopPaymentConfigLoader; - $this->configValidator = $configValidator; - $this->internalCache = array(); - }" -AmazonPaymentConfigFactory,* @var ShopPaymentConfigLoaderInterface,"public function getConfig($portalId) - { - if (array_key_exists($portalId, $this->internalCache)) { - return $this->internalCache[$portalId]; - }" -AmazonPaymentGroupConfig,* @var \IPkgShopOrderPaymentConfig,"public function __construct(\IPkgShopOrderPaymentConfig $config) - { - $this->config = $config; - }" -AmazonPaymentGroupConfig,* @var \OffAmazonPaymentsService_Client|null,"public function getValue($key, $default = null) - { - return $this->config->getValue($key, $default); - }" -AmazonPaymentGroupConfig,* @var LoggerInterface,"public function getMerchantId() - { - return $this->getAmazonAPI()->getMerchantValues()->getMerchantId(); - }" -AmazonPaymentGroupConfig,* {@inheritdoc},"public function getAccessKey() - { - return $this->getAmazonAPI()->getMerchantValues()->getAccessKey(); - }" -AmazonPaymentGroupConfig,* @return string|null,"public function getSecretKey() - { - return $this->getAmazonAPI()->getMerchantValues()->getSecretKey(); - }" -AmazonPaymentGroupConfig,* @return string|null,"public function getApplicationName() - { - return $this->getAmazonAPI()->getMerchantValues()->getApplicationName(); - }" -AmazonPaymentGroupConfig,* @return string|null,"public function getApplicationVersion() - { - return $this->getAmazonAPI()->getMerchantValues()->getApplicationVersion(); - }" -AmazonPaymentGroupConfig,* @return string|null,"public function getRegion() - { - return $this->getAmazonAPI()->getMerchantValues()->getRegion(); - }" -AmazonPaymentGroupConfig,* @return string|null,"public function getServiceURL() - { - return $this->getAmazonAPI()->getMerchantValues()->getServiceUrl(); - }" -AmazonPaymentGroupConfig,* @return string - one of self::REGION_*,"public function getWidgetURL() - { - return $this->getAmazonAPI()->getMerchantValues()->getWidgetUrl(); - }" -AmazonPaymentGroupConfig,"* returns the full localized service URL. - * - * @return string|null","public function getPayWithAmazonButton() - { - $buttonURL = $this->getValue('payWithAmazonButtonURL', null); - if (null !== $buttonURL) { - $buttonURL .= '?sellerId='.urlencode($this->getMerchantId()); - }" -AmazonPaymentGroupConfig,"* returns the full localized widgetURL. - * - * @return string|null","public function getPayWithAmazonButtonText() - { - return $this->getValue('payWithAmazonButtonText', null); - }" -AmazonPaymentGroupConfig,"* return buy button url inc. merchant id parameter. - * - * @return string","public function getPlatformId() - { - return self::ESONO_PLATFORM_ID; - }" -AmazonPaymentGroupConfig,"* return buy button text. - * - * @return string","public function getAmazonAPI() - { - if (null !== $this->amazonApi) { - return $this->amazonApi; - }" -AmazonPaymentGroupConfig,* @return \OffAmazonPaymentsService_Client,"public function getAmazonIPNAPI() - { - return new \OffAmazonPaymentsNotifications_Client(); - }" -AmazonPaymentGroupConfig,"* return the IPN api. - * - * @return \OffAmazonPaymentsNotifications_Client","public function getSellerAuthorizationNote(\TdbShopOrder $order, $amount, $captureNow, array $itemList = array()) - { - $text = $this->getValue('sellerAuthorizationNote'); - $data = $this->getTemplateDataFromOrder($order); - $data['captureNow'] = $captureNow; - $data['transaction__totalValue'] = $amount; - $data['transaction__items'] = $itemList; - - return $this->render($text, $data); - }" -AmazonPaymentGroupConfig,"* returns a text displayed on the auth email sent by amazon to the buyer. - * - * @param \TdbShopOrder $order - * @param float $amount - * @param bool $captureNow - * @param array $itemList - * - * @return string","public function getSellerOrderNote(\TdbShopOrder $order) - { - $text = $this->getValue('sellerNote'); - $data = $this->getTemplateDataFromOrder($order); - - return mb_substr($this->render($text, $data), 0, 1024); - }" -AmazonPaymentGroupConfig,"* Represents a description of the order that is displayed in emails to the buyer. (max 1024 chars). - * - * @param \TdbShopOrder $order - * - * @return string","public function getSoftDescriptor(\TdbShopOrder $order, $invoiceNumber = null) - { - $text = $this->getValue('softDescriptor'); - $data = $this->getTemplateDataFromOrder($order); - $data['invoiceNumber'] = $invoiceNumber; - - return mb_substr($this->render($text, $data), 0, 16); - }" -AmazonPaymentGroupConfig,"* The description to be shown on the buyer’s payment instrument statement. Maximum: 16 characters. - * - * @param \TdbShopOrder $order - * @param string|null $invoiceNumber - optionally you may pass an invoice number - * - * @return string","public function amazonOrderReferenceObjectFactory($amazonOrderReferenceId) - { - return new AmazonOrderReferenceObject($this, $amazonOrderReferenceId, $this->getLogger()); - }" -AmazonPaymentGroupConfig,"* extract data from oder to be used by text generated via template. - * - * @param \TdbShopOrder $order - * - * @return array","public function amazonReferenceIdManagerFactory(Connection $dbal, $sourceType, $sourceId) - { - switch ($sourceType) { - case self::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_SHOP_ORDER_ID: - return AmazonReferenceIdManager::createFromShopOrderId($dbal, $sourceId); - break; - case self::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_AMAZON_ORDER_REFERENCE_ID: - return AmazonReferenceIdManager::createFromOrderReferenceId($dbal, $sourceId); - break; - case self::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID: - return AmazonReferenceIdManager::createFromLocalId($dbal, $sourceId); - break; - default: - throw new \InvalidArgumentException('sourceType must be one of AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_*'); - }" -AmazonPaymentGroupConfig,"* @param $templateString - * @param array $data - * - * @return string","public function setLogger(LoggerInterface $logger) - { - $this->logger = $logger; - }" -AmazonPaymentGroupConfig,"* @param string $amazonOrderReferenceId - * - * @return AmazonOrderReferenceObject","public function getEnvironment() - { - return $this->config->getEnvironment(); - }" -AmazonPaymentGroupConfig,"* @param Connection $dbal - * @param int $sourceType one of self::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_* - * @param string $sourceId - * - * @return AmazonReferenceIdManager|null - * - * @throws \InvalidArgumentException","public function isCaptureOnShipment() - { - return $this->config->isCaptureOnShipment(); - }" -AmazonPaymentGroupConfig,* @return LoggerInterface,"public function setCaptureOnShipment($captureOnShipment) - { - $this->config->setCaptureOnShipment($captureOnShipment); - }" -AmazonPaymentGroupConfig,* @param LoggerInterface $logger,"public function getAllValues() - { - return $this->config->getAllValues(); - }" -AmazonShopActionPlugin,* @return \ICmsCoreRedirect,"public function setAmazonOrderReferenceId($requestParameter) - { - $amazonOrderReferenceId = isset($requestParameter['amazonOrderReferenceId']) ? $requestParameter['amazonOrderReferenceId'] : null; - if (null === $amazonOrderReferenceId) { - return; - }" -AmazonShopActionPlugin,* @return SystemPageServiceInterface,"public function errorAmazonLogin($requestParameter) - { - $error = isset($requestParameter['error']) ? $requestParameter['error'] : null; - $errorCode = isset($requestParameter['errorCode']) ? $requestParameter['errorCode'] : null; - $this->handleError($error, $errorCode); - }" -ConfigProvider,"* ConfigProvider adds configuration data that was given through its constructor argument. - * It is designed to provide Symfony configuration values, and so does not take care of any portal - * specifics.","public function __construct(array $configList) - { - $this->configValues = array(); - foreach ($configList as $environment => $environmentConfig) { - foreach ($environmentConfig as $name => $value) { - $this->configValues[] = new ShopPaymentConfigRawValue( - $name, - $value, - $environment, - '', - ShopPaymentConfigRawValue::SOURCE_ADDITIONAL - ); - }" -ConfigProvider,* {@inheritdoc},"public function getAdditionalConfiguration() - { - return $this->configValues; - }" -ConfigValidator,"* @param \IPkgShopOrderPaymentConfig $config - * - * @throws \InvalidArgumentException","public function validate(\IPkgShopOrderPaymentConfig $config) - { - $required = array( - 'merchantId', - 'accessKey', - 'applicationName', - 'applicationVersion', - 'region', - 'payWithAmazonButtonURL', - ); - foreach ($required as $field) { - if (null === $config->getValue($field, null)) { - throw new \InvalidArgumentException(""required parameter {$field}" -ChameleonSystemAmazonPaymentExtension,"* Loads a specific configuration. - * - * @param array $config An array of configuration values - * @param ContainerBuilder $container A ContainerBuilder instance - * - * @throws \InvalidArgumentException When provided tag is not defined in this extension - * - * @api","public function load(array $config, ContainerBuilder $container) - { - $config = $this->processConfiguration(new Configuration(), $config); - $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - $serviceDefDataFetcher = $container->getDefinition('chameleon_system_amazon_payment.config_provider'); - $serviceDefDataFetcher->replaceArgument(0, $config); - }" -ChameleonSystemAmazonPaymentExtension,* {@inheritdoc},"public function prepend(ContainerBuilder $container) - { - $container->prependExtensionConfig('monolog', ['channels' => ['order_payment_amazon']]); - }" -AmazonAuthorizationDeclinedException,"* @param string $reasonCode - one of self::REASON_CODE_* - * @param array $aAdditionalData - * @param string $message - * @param array $aContextData - * @param int $iLogLevel - * @param string $sLogFilePath","public function __construct( - $reasonCode, - $aAdditionalData = array(), - $message = '', - $aContextData = array(), // any data you want showing up in the log message to help you debug the exception - $iLogLevel = 1, - $sLogFilePath = self::LOG_FILE - ) { - parent::__construct( - AmazonPayment::ERROR_AUTHORIZATION_DECLINED, - $aAdditionalData, - $message, - $aContextData, - $iLogLevel, - $sLogFilePath - ); - $this->reasonCode = $reasonCode; - }" -AmazonAuthorizationDeclinedException,* @return string|null,"public function __toString() - { - $sString = parent::__toString(); - $sString .= ""\n"".'reasonCode: '.$this->getReasonCode(); - - return $sString; - }" -AmazonCaptureDeclinedException,"* @param string $reasonCode - one of self::REASON_CODE_* - * @param array $aAdditionalData - * @param string $message - * @param array $aContextData - * @param int $iLogLevel - * @param string $sLogFilePath","public function __construct( - $reasonCode, - $aAdditionalData = array(), - $message = '', - $aContextData = array(), // any data you want showing up in the log message to help you debug the exception - $iLogLevel = 1, - $sLogFilePath = self::LOG_FILE - ) { - parent::__construct( - AmazonPayment::ERROR_CAPTURE_DECLINED, - $aAdditionalData, - $message, - $aContextData, - $iLogLevel, - $sLogFilePath - ); - $this->reasonCode = $reasonCode; - }" -AmazonCaptureDeclinedException,* @return string|null,"public function __toString() - { - $sString = parent::__toString(); - $sString .= ""\n"".'reasonCode: '.$this->getReasonCode(); - - return $sString; - }" -AmazonConstraintException,* @var \OffAmazonPaymentsService_Model_OrderReferenceDetails,"public function getOrderReferenceDetails() - { - return $this->orderReferenceDetails; - }" -AmazonConstraintException,* @return \OffAmazonPaymentsService_Model_OrderReferenceDetails,"public function setOrderReferenceDetails($orderReferenceDetails) - { - $this->orderReferenceDetails = $orderReferenceDetails; - }" -AmazonIPNTransactionException,* @return string|null,"public function __construct( - $errorCode, - $message = '', - $aContextData = array(), // any data you want showing up in the log message to help you debug the exception - $iLogLevel = Logger::ERROR, - $sLogFilePath = self::LOG_FILE - ) { - parent::__construct($message, $aContextData, $iLogLevel, $sLogFilePath); - $this->errorCode = $errorCode; - }" -AmazonRefundAmazonAPIException,"* @param string $successfulTransactionList - * @param array $aAdditionalData - * @param string $message - * @param array $aContextData - * @param int $iLogLevel - * @param string $sLogFilePath","public function __construct( - $successfulTransactionList, - $aAdditionalData = array(), - $message = '', - $aContextData = array(), // any data you want showing up in the log message to help you debug the exception - $iLogLevel = 1, - $sLogFilePath = self::LOG_FILE - ) { - parent::__construct( - AmazonPayment::ERROR_CODE_API_ERROR, - $aAdditionalData, - $message, - $aContextData, - $iLogLevel, - $sLogFilePath - ); - $this->successfulTransactionList = $successfulTransactionList; - }" -AmazonRefundAmazonAPIException,"* array of \TdbPkgShopPaymentTransaction that where successful before the one that was declined. - * - * @return array","public function __toString() - { - $sString = parent::__toString(); - $sString .= ""\n"".'with '.count( - $this->getSuccessfulTransactionList() - ).' successful transactions before the refund request that was declined'; - - return $sString; - }" -AmazonRefundDeclinedException,"* @param string $reasonCode - one of self::REASON_CODE_* - * @param array $aAdditionalData - * @param string $message - * @param array $aContextData - * @param int $iLogLevel - * @param string $sLogFilePath","public function __construct( - $reasonCode, - $aAdditionalData = array(), - $message = '', - $aContextData = array(), // any data you want showing up in the log message to help you debug the exception - $iLogLevel = 1, - $sLogFilePath = self::LOG_FILE - ) { - parent::__construct( - AmazonPayment::ERROR_REFUND_DECLINED, - $aAdditionalData, - $message, - $aContextData, - $iLogLevel, - $sLogFilePath - ); - $this->reasonCode = $reasonCode; - }" -AmazonRefundDeclinedException,* @return string|null,"public function __toString() - { - $sString = parent::__toString(); - $sString .= ""\n"".'reasonCode: '.$this->getReasonCode(); - $sString .= ""\n"".'with '.count( - $this->getSuccessfulTransactionList() - ).' successful transactions before the refund request that was declined'; - - return $sString; - }" -AmazonRefundDeclinedException,"* array of \TdbPkgShopPaymentTransaction that where successful before the one that was declined. - * - * @return array","public function getReasonCode() - { - return $this->reasonCode; - }" -AmazonRefundDeclinedException,* @param array $successfulTransactionList,"public function getSuccessfulTransactionList() - { - return $this->successfulTransactionList; - }" -,"* @param AmazonPaymentGroupConfig $config - * @param string $amazonOrderReferenceId - * @param LoggerInterface $logger","public function __construct(AmazonPaymentGroupConfig $config, $amazonOrderReferenceId, LoggerInterface $logger); - - /** - * @param \TdbShopOrder $order - * - * @return \OffAmazonPaymentsService_Model_OrderReferenceDetails - * - * @throws \TPkgCmsException_Log - */ - public function setOrderReferenceDetails(\TdbShopOrder $order); - - /** - * set the order reference value to the value passed. - * - * @param float $orderValue - * - * @return \OffAmazonPaymentsService_Model_OrderReferenceDetails - */ - public function setOrderReferenceOrderValue($orderValue); - - /** - * the method assumes that the order is free of constraints (successful call to setOrderReferenceDetails) - * \TPkgCmsException_LogAndMessage. - */ - public function confirmOrderReference(); - - /** - * performs an auth without capture. - * - * @param \TdbShopOrder $order - * @param string $localAuthorizationReferenceId - * @param float $amount - * @param bool $synchronous - * - * @return \OffAmazonPaymentsService_Model_AuthorizationDetails - * - * @throws \TPkgCmsException_LogAndMessage - * @throws AmazonAuthorizationDeclinedException - */ - public function authorize(\TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous); - - /** - * performs an auth with capture. - * - * @param \TdbShopOrder $order - * @param string $localAuthorizationReferenceId - * @param float $amount - * @param bool $synchronous - * @param string $invoiceNumber - 16 char id shown on the payment statement of the buy (usually the order number or the bill number). will be passed to AmazonPaymentGroupConfig::getSellerAuthorizationNote - * - * @return \OffAmazonPaymentsService_Model_AuthorizationDetails - * - * @throws \TPkgCmsException_LogAndMessage - * @throws AmazonAuthorizationDeclinedException - */ - public function authorizeAndCapture( - \TdbShopOrder $order, - $localAuthorizationReferenceId, - $amount, - $synchronous, - $invoiceNumber = null - ); - - /** - * @param \TdbShopOrder $order - * @param string $amazonAuthorizationId - the auth id which is to be captured - * @param string $localCaptureReferenceId - * @param float $amount - * @param string $invoiceNumber - 16 char id shown on the payment statement of the buy (usually the order number or the bill number) - * - * @return \OffAmazonPaymentsService_Model_CaptureDetails - * - * @throws \TPkgCmsException_LogAndMessage - * @throws AmazonCaptureDeclinedException - */ - public function captureExistingAuthorization( - \TdbShopOrder $order, - $amazonAuthorizationId, - $localCaptureReferenceId, - $amount, - $invoiceNumber = null - ); - - /** - * @param \TdbShopOrder $order - * @param string $amazonCaptureId - * @param string $localRefundReferenceId - * @param float $amount - * @param null $invoiceNumber - 16 char id shown on the payment statement of the buy (usually the order number or the bill number) - * @param string $sellerRefundNote - 255 char note shown on the refund mail sent by amazon - * - * @return \OffAmazonPaymentsService_Model_RefundDetails - * - * @throws \TPkgCmsException_LogAndMessage - * @throws AmazonRefundDeclinedException - */ - public function refund( - \TdbShopOrder $order, - $amazonCaptureId, - $localRefundReferenceId, - $amount, - $invoiceNumber = null, - $sellerRefundNote = null - ); - - /** - * @param array $constraintsThatShouldBeIgnored - list of constraints (self::CONSTRAINT_*, - * - * @return \OffAmazonPaymentsService_Model_OrderReferenceDetails - * - * @throws \TPkgCmsException_LogAndMessage - * @throws \InvalidArgumentException - */ - public function getOrderReferenceDetails(array $constraintsThatShouldBeIgnored = null); - - /** - * @param string $amazonAuthorizationId - * - * @return \OffAmazonPaymentsService_Model_AuthorizationDetails - * - * @throws \TPkgCmsException_LogAndMessage - */ - public function getAuthorizationDetails($amazonAuthorizationId); - - /** - * @param string $amazonCaptureId - * - * @return \OffAmazonPaymentsService_Model_CaptureDetails - * - * @throws \TPkgCmsException_LogAndMessage - */ - public function getCaptureDetails($amazonCaptureId); - - /** - * @param string $amazonRefundId - * - * @return \OffAmazonPaymentsService_Model_RefundDetails - * - * @throws \TPkgCmsException_LogAndMessage - */ - public function getRefundDetails($amazonRefundId); - - /** - * @param string $cancellationReason - Describes the reason for the cancellation. (max 1024 chars - everything above 1024 chars will be truncated) - * - * @throws \TPkgCmsException_LogAndMessage - */ - public function cancelOrderReference($cancellationReason = null); - - /** - * @param string $closureReason Describes the reason for closing the order reference. (max 1024 chars - everything above 1024 chars will be truncated) - * - * @throws \TPkgCmsException_LogAndMessage - */ - public function closeOrderReference($closureReason = null); - - /** - * @param string $amazonAuthorizationId - * @param string $closureReason Describes the reason for closing the authorization (max 1024 chars - everything above 1024 chars will be truncated) - */ - public function closeAuthorization($amazonAuthorizationId, $closureReason = null); - - /** - * returns the amazon capture id form the captureIdList passed which has a remaining refundable value that most closely matches - * the requested refund value. If there there is no capture that covers the refund value completely, then a list of matching IDs - * will be returned so as that the refundable sum of the items most closely matches the requested refund. - * - * @param AmazonReferenceIdList $captureIdList - * @param float $refundValue - * - * @return array [amazonCaptureId => refundableValue] - */ - public function findBestCaptureMatchForRefund(AmazonReferenceIdList $captureIdList, $refundValue); -}" -,* @return string,"public function setLocalId($localId); - - /** - * @return string - */ - public function getLocalId(); - - /** - * @return string - */ - public function getAmazonId(); - - /** - * @return float - */ - public function getValue(); - - /** - * return the transaction id associated with the counter. - * - * @return string - */ - public function getTransactionId(); - - /** - * @param int $type - must be one of self::TYPE_AUTHORIZE - * @param string $localId - * @param float $value - * @param string $transactionId - */ - public function __construct($type, $localId, $value, $transactionId); - - /** - * @param string $amazonId - */ - public function setAmazonId($amazonId); - - public function getType(); - - /** - * @param bool $captureNow - */ - public function setCaptureNow($captureNow); - - /** - * @return bool - */ - public function getCaptureNow(); - - /** - * returns self::REQUEST_MODE_SYNCHRONOUS or self::REQUEST_MODE_ASYNCHRONOUS. - * - * @return int - */ - public function getRequestMode(); - - /** - * @param int $requestMode - one of self::REQUEST_MODE_ASYNCHRONOUS - * - * @throws \InvalidArgumentException - */ - public function setRequestMode($requestMode); -}" -,"* @param float $value - * @param string $transactionId the transaction id associated with the counter - * - * @return IAmazonReferenceId","public function __construct($amazonOrderReferenceId, $type); - - /** - * @param float $value - * @param string $transactionId the transaction id associated with the counter - * - * @return IAmazonReferenceId - */ - public function getNew($value, $transactionId = null); - - /** - * returns the last element in the list. - * - * @return IAmazonReferenceId - */ - public function getLast(); -}" -AmazonIPNHandler,"* process the IPN request - the request object contains all details (payment handler, group, order etc) - * the call should return true if processing should continue, false if it is to stop. On Error it should throw an error - * extending AbstractPkgShopPaymentIPNHandlerException. - * - * @param TPkgShopPaymentIPNRequest $oRequest - * @trows AbstractPkgShopPaymentIPNHandlerException - * - * @return bool","public function handleIPN(TPkgShopPaymentIPNRequest $oRequest) - { - // need to answer with OK - $this->sentOKHeader(); - - $aRequestData = $oRequest->getRequestPayload(); - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Notification */ - $amazonNotificationObject = $aRequestData['amazonNotificationObject']; - $amazonReferenceIdManager = $aRequestData['amazonReferenceIdManager']; - - switch ($amazonNotificationObject->getNotificationType()) { - case 'OrderReferenceNotification': - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_OrderReferenceNotification */ - $details = $amazonNotificationObject->getOrderReference(); - $this->handleIPNOrderReferenceNotification($oRequest, $details); - - break; - case 'AuthorizationNotification': - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_AuthorizationNotification */ - $details = $amazonNotificationObject->getAuthorizationDetails(); - $this->handleIPNAuthorizationNotification($oRequest, $details, $amazonReferenceIdManager); - break; - case 'CaptureNotification': - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_CaptureNotification */ - $details = $amazonNotificationObject->getCaptureDetails(); - $this->handleIPNCaptureNotification($oRequest, $details); - break; - case 'RefundNotification': - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_RefundNotification */ - $details = $amazonNotificationObject->getRefundDetails(); - $this->handleIPNRefundNotification($oRequest, $details); - break; - }" -AmazonIPNHandler,@var $amazonNotificationObject \OffAmazonPaymentsNotifications_Notification,"public function getIPNTransactionDetails(TPkgShopPaymentIPNRequest $oRequest) - { - return null; - }" -AmazonIPNHandler,@var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,"public function setAmazonConfig(AmazonPaymentGroupConfig $amazonConfig) - { - $this->amazonConfig = $amazonConfig; - }" -AmazonIPNHandler,@var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_AuthorizationNotification,"public function setTransactionManager($transactionManager) - { - $this->transactionManager = $transactionManager; - }" -AmazonPaymentIPNInvalidException,"* the header to return to the caller. - * - * @return string","public function getResponseHeader() - { - return 'HTTP/1.1 503 Service Unavailable'; - }" -for,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - if (!is_null($data)) { - if ($this->_isAssociativeArray($data)) { - $this->_fromAssociativeArray($data); - }" -for,* OffAmazonPayments_Model - base class for all model classes,"public function __get($propertyName) - { - $getter = ""get$propertyName""; - return $this->$getter(); - }" -for,"* Defined fields for the model - * object - * - * @var array","public function __set($propertyName, $propertyValue) - { - $setter = ""set$propertyName""; - $this->$setter($propertyValue); - return $this; - }" -OffAmazonPaymentsNotifications_Client,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct() - { - $this->_snsMessageValidator - = new SnsMessageValidator(new OpenSslVerifySignature()); - }" -OffAmazonPaymentsNotifications_Client,"* Implementation of the OffAmazonPaymentsNotifications - * library - *","public function parseRawMessage($headers, $body) - { - // Is this json, is this - // an sns message, do we have the fields we require - $snsMessage = SnsMessageParser::parseNotification($headers, $body); - - // security validation - check that this message is - // from amazon and that it has been signed correctly - $this->_snsMessageValidator->validateMessage($snsMessage); - - // Convert to object - convert from basic class to object - $ipnMessage = IpnNotificationParser::parseSnsMessage($snsMessage); - return XmlNotificationParser::parseIpnMessage($ipnMessage); - }" -,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function parseRawMessage($headers, $body); -}" -,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function getNotificationType(); - - /** - * Return the metadata for the notification - * - * @return OffAmazonPaymentsNotifications_NotificationMetadata notificationMetadata - */ - public function getNotificationMetadata(); -}" -,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function getNotificationMetadataType(); - - /** - * Returns the parent message information type - * or null if not defined - * - * @return NotificationMetadata message information type - */ - public function getParentNotificationMetadata(); - - /** - * Returns true if a parent notification is defined - * - * @return bool - true if parent notification is defined - */ - public function hasParentNotificationMetadata(); -}" -Message,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($json) - { - $this->_message = json_decode($json, true); - - $json_error = json_last_error(); - - if ($json_error != 0) { - $errorMsg = ""Error with message - content is not in json format"" . - self::_getErrorMessageForJsonError($json_error) . "" "" . - $json; - throw new OffAmazonPaymentsNotifications_InvalidMessageException( - $errorMsg - ); - }" -Message,"* Class to wrap a message - *","public function setNotificationMetadata($notificationMetadata) - { - $this->_notificationMetadata = $notificationMetadata; - }" -Message,"* Json message as associative array - * - * @var array","public function getNotificationMetadata() - { - return $this->_notificationMetadata; - }" -Message,"* Metadata for the request - * - * @var NotificationMetadata","public function getMandatoryField($fieldName) - { - $value = $this->getField($fieldName); - if (is_null($value)) { - throw new OffAmazonPaymentsNotifications_InvalidMessageException( - ""Error with json message - mandatory field "" . $fieldName . - "" cannot be found"" - ); - }" -Message,"* Create a new instance of the message and - * wraps the contents in a class - * - * Throws an exception if the message is not valid - * as defined by the implementation of this class - * - * @param string $json json string - * - * @throws OffAmazonPaymentsNotifications_InvalidMessageException - * - * @return new instance of concreate class","public function getField($fieldName) - { - if (array_key_exists($fieldName, $this->_message)) { - return $this->_message[$fieldName]; - }" -OpenSslVerifySignature,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License . - * *****************************************************************************","public function __construct() - { - - }" -OpenSslVerifySignature,"* OpenSSL Implemntation of the verify signature algorithm - *","public function verifySignatureIsCorrect($data, $signature, $certificatePath) - { - $cert = $this->_getCertificateFromCertifcatePath($certificatePath); - - $certKey = openssl_get_publickey($cert); - - if ($certKey === False) { - throw new OffAmazonPaymentsNotifications_InvalidMessageException( - ""Unable to extract public key from cert "" . $cert); - }" -SnsMessageValidator,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct(VerifySignature $verifySignature) - { - $this->_verifySignature = $verifySignature; - }" -SnsMessageValidator,"* Performs validation of the sns message to - * make sure signatures match and is signed by - * Amazon - *","public function validateMessage(Message $snsMessage) - { - switch($snsMessage->getMandatoryField(""SignatureVersion"")) { - case ""1"": - $this->_verifySignatureWithVersionOneAlgorithm($snsMessage); - break; - default: - throw new OffAmazonPaymentsNotifications_InvalidMessageException( - ""Error with signature verification - "" . - ""unable to handle signature version "" . - $snsMessage->getMandatoryField(""SignatureVersion"") - ); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'AmazonAuthorizationId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'AuthorizationReferenceId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'AuthorizationAmount' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ), - 'CapturedAmount' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ), - 'AuthorizationFee' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ), - 'IdList' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_IdList' - ), - 'CreationTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ExpirationTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'AuthorizationStatus' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status' - ), - 'OrderItemCategories' => array( - 'FieldValue' => null, - 'FieldType' - => 'OffAmazonPaymentsNotifications_Model_OrderItemCategories' - ), - 'CaptureNow' => array( - 'FieldValue' => null, - 'FieldType' => 'bool' - ), - 'SoftDescriptor' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* OffAmazonPaymentsNotifications_Model_AuthorizationDetails - * - * Properties: - * ","public function getAmazonAuthorizationId() - { - return $this->fields['AmazonAuthorizationId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Construct new OffAmazonPaymentsNotifications_Model_AuthorizationDetails - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmazonAuthorizationId($value) - { - $this->fields['AmazonAuthorizationId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the AmazonAuthorizationId property. - * - * @return string AmazonAuthorizationId","public function withAmazonAuthorizationId($value) - { - $this->setAmazonAuthorizationId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AmazonAuthorizationId property. - * - * @param string $value AmazonAuthorizationId value - * - * @return $this instance","public function isSetAmazonAuthorizationId() - { - return !is_null($this->fields['AmazonAuthorizationId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AmazonAuthorizationId and returns this instance - * - * @param string $value AmazonAuthorizationId value - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getAuthorizationReferenceId() - { - return $this->fields['AuthorizationReferenceId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if AmazonAuthorizationId is set - * - * @return bool true if AmazonAuthorizationId is set","public function setAuthorizationReferenceId($value) - { - $this->fields['AuthorizationReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the AuthorizationReferenceId property. - * - * @return string AuthorizationReferenceId","public function withAuthorizationReferenceId($value) - { - $this->setAuthorizationReferenceId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AuthorizationReferenceId property. - * - * @param string $value AuthorizationReferenceId - * - * @return $this instance","public function isSetAuthorizationReferenceId() - { - return !is_null($this->fields['AuthorizationReferenceId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AuthorizationReferenceId and returns this instance - * - * @param string $value AuthorizationReferenceId - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getAuthorizationAmount() - { - return $this->fields['AuthorizationAmount']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if AuthorizationReferenceId is set - * - * @return bool true if AuthorizationReferenceId is set","public function setAuthorizationAmount($value) - { - $this->fields['AuthorizationAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the AuthorizationAmount. - * - * @return Price AuthorizationAmount","public function withAuthorizationAmount($value) - { - $this->setAuthorizationAmount($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AuthorizationAmount. - * - * @param Price $value AuthorizationAmount - * - * @return void","public function isSetAuthorizationAmount() - { - return !is_null($this->fields['AuthorizationAmount']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AuthorizationAmount and returns this instance - * - * @param Price $value AuthorizationAmount - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getCapturedAmount() - { - return $this->fields['CapturedAmount']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if AuthorizationAmount is set - * - * @return bool true if AuthorizationAmount property is set","public function setCapturedAmount($value) - { - $this->fields['CapturedAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the CapturedAmount. - * - * @return Price CapturedAmount","public function withCapturedAmount($value) - { - $this->setCapturedAmount($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the CapturedAmount. - * - * @param Price $value CapturedAmount - * - * @return void","public function isSetCapturedAmount() - { - return !is_null($this->fields['CapturedAmount']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the CapturedAmount and returns this instance - * - * @param Price $value CapturedAmount - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getAuthorizationFee() - { - return $this->fields['AuthorizationFee']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if CapturedAmount is set - * - * @return bool true if CapturedAmount property is set","public function setAuthorizationFee($value) - { - $this->fields['AuthorizationFee']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the AuthorizationFee. - * - * @return Price AuthorizationFee","public function withAuthorizationFee($value) - { - $this->setAuthorizationFee($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AuthorizationFee. - * - * @param Price $value AuthorizationFee - * - * @return void","public function isSetAuthorizationFee() - { - return !is_null($this->fields['AuthorizationFee']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AuthorizationFee and returns this instance - * - * @param Price $value AuthorizationFee - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getIdList() - { - return $this->fields['IdList']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if AuthorizationFee is set - * - * @return bool true if AuthorizationFee property is set","public function setIdList($value) - { - $this->fields['IdList']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the IdList. - * - * @return IdList IdList","public function withIdList($value) - { - $this->setIdList($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the IdList. - * - * @param IdList $value IdList - * - * @return void","public function isSetIdList() - { - return !is_null($this->fields['IdList']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the IdList and returns this instance - * - * @param IdList $value IdList - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getCreationTimestamp() - { - return $this->fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if IdList is set - * - * @return bool true if IdList property is set","public function setCreationTimestamp($value) - { - $this->fields['CreationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the CreationTimestamp property. - * - * @return string CreationTimestamp","public function withCreationTimestamp($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the CreationTimestamp property. - * - * @param string $value CreationTimestamp - * - * @return $this instance","public function isSetCreationTimestamp() - { - return !is_null($this->fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the CreationTimestamp and returns this instance - * - * @param string $value CreationTimestamp - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getExpirationTimestamp() - { - return $this->fields['ExpirationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp is set","public function setExpirationTimestamp($value) - { - $this->fields['ExpirationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the ExpirationTimestamp property. - * - * @return string ExpirationTimestamp","public function withExpirationTimestamp($value) - { - $this->setExpirationTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the ExpirationTimestamp property. - * - * @param string $value ExpirationTimestamp - * - * @return $this instance","public function isSetExpirationTimestamp() - { - return !is_null($this->fields['ExpirationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the ExpirationTimestamp and returns this instance - * - * @param string $value ExpirationTimestamp - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getAuthorizationStatus() - { - return $this->fields['AuthorizationStatus']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if ExpirationTimestamp is set - * - * @return bool true if ExpirationTimestamp is set","public function setAuthorizationStatus($value) - { - $this->fields['AuthorizationStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the AuthorizationStatus. - * - * @return OffAmazonPaymentsNotifications_Model_Status AuthorizationStatus","public function withAuthorizationStatus($value) - { - $this->setAuthorizationStatus($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AuthorizationStatus. - * - * @param Status $value AuthorizationStatus - * - * @return void","public function isSetAuthorizationStatus() - { - return !is_null($this->fields['AuthorizationStatus']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the AuthorizationStatus and returns this instance - * - * @param Status $value AuthorizationStatus - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getOrderItemCategories() - { - return $this->fields['OrderItemCategories']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if AuthorizationStatus is set - * - * @return bool true if AuthorizationStatus property is set","public function setOrderItemCategories($value) - { - $this->fields['OrderItemCategories']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the OrderItemCategories. - * - * @return OrderItemCategories OrderItemCategories","public function withOrderItemCategories($value) - { - $this->setOrderItemCategories($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the OrderItemCategories. - * - * @param OrderItemCategories $value OrderItemCategories - * - * @return void","public function isSetOrderItemCategories() - { - return !is_null($this->fields['OrderItemCategories']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the OrderItemCategories and returns this instance - * - * @param OrderItemCategories $value OrderItemCategories - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getCaptureNow() - { - return $this->fields['CaptureNow']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if OrderItemCategories is set - * - * @return bool true if OrderItemCategories property is set","public function setCaptureNow($value) - { - $this->fields['CaptureNow']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the CaptureNow property. - * - * @return bool CaptureNow","public function withCaptureNow($value) - { - $this->setCaptureNow($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the CaptureNow property. - * - * @param bool $value CaptureNow - * - * @return $this instance","public function isSetCaptureNow() - { - return !is_null($this->fields['CaptureNow']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the CaptureNow and returns this instance - * - * @param bool $value CaptureNow - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails instance","public function getSoftDescriptor() - { - return $this->fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Checks if CaptureNow is set - * - * @return bool true if CaptureNow is set","public function setSoftDescriptor($value) - { - $this->fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function withSoftDescriptor($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationDetails,"* Sets the value of the SoftDescriptor property. - * - * @param string $value SoftDescriptor - * - * @return $this instance","public function isSetSoftDescriptor() - { - return !is_null($this->fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationNotification,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, - $data = null - ) { - $this->fields = array ( - 'AuthorizationDetails' => array( - 'FieldValue' => null, - 'FieldType' => - 'OffAmazonPaymentsNotifications_Model_AuthorizationDetails' - ) - ); - parent::__construct( - $notificationMetadata, - ""AuthorizationNotification"", - $data - ); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationNotification,"* OffAmazonPaymentsNotifications_Model_AuthorizationNotification - * - * Properties: - * ","public function getAuthorizationDetails() - { - return $this->fields['AuthorizationDetails']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationNotification,"* Construct new OffAmazonPaymentsNotifications_Model_AuthorizationNotification - * - * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request - * @param mixed $data DOMElement or Associative Array - * to construct from. - * - * Valid properties: - * ","public function setAuthorizationDetails($value) - { - $this->fields['AuthorizationDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationNotification,"* Construct OffAmazonPaymentsNotifications_Model_AuthorizationNotification - * from XML string - * - * @param string $xml XML string to construct from - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationNotification","public function withAuthorizationDetails($value) - { - $this->setAuthorizationDetails($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_AuthorizationNotification,"* Gets the value of the AuthorizationNotification. - * - * @return OffAmazonPaymentsNotifications_Model_AuthorizationDetails property value","public function isSetAuthorizationDetails() - { - return !is_null($this->fields['AuthorizationDetails']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_AuthorizationNotification,"* Sets the value of the AuthorizationDetails. - * - * @param AuthorizationDetails $value new value - * - * @return void","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->fields = array( - 'AmazonBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'SellerBillingAgreementAttributes' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes' - ), - 'BillingAgreementStatus' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_BillingAgreementStatus' - ), - 'CreationTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'BillingAgreementLimits' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_BillingAgreementLimits' - ), - 'BillingAgreementConsent' => array( - 'FieldValue' => null, - 'FieldType' => 'bool' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* OffAmazonPaymentsNotifications_Model_BillingAgreement - * - * Properties: - * ","public function getAmazonBillingAgreementId () - { - return $this->fields['AmazonBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Construct new OffAmazonPaymentsNotifications_Model_BillingAgreement - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmazonBillingAgreementId ($value) - { - $this->fields['AmazonBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Gets the value of the AmazonBillingAgreementId property. - * - * @return string AmazonBillingAgreementId","public function withAmazonBillingAgreementId ($value) - { - $this->setAmazonBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the AmazonBillingAgreementId property. - * - * @param string AmazonBillingAgreementId - * @return $this instance","public function isSetAmazonBillingAgreementId () - { - return ! is_null($this->fields['AmazonBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the AmazonBillingAgreementId and returns this instance - * - * @param string $value AmazonBillingAgreementId - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementDetails instance","public function getBillingAgreementLimits () - { - return $this->fields['BillingAgreementLimits']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Checks if AmazonBillingAgreementId is set - * - * @return bool true if AmazonBillingAgreementId is set","public function setBillingAgreementLimits ($value) - { - $this->fields['BillingAgreementLimits']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Gets the value of the BillingAgreementLimits. - * - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementLimits BillingAgreementLimits","public function withBillingAgreementLimits ($value) - { - $this->setBillingAgreementLimits($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the BillingAgreementLimits. - * - * @param OffAmazonPaymentsNotifications_Model_BillingAgreementLimits BillingAgreementLimits - * @return void","public function isSetBillingAgreementLimits () - { - return ! is_null($this->fields['BillingAgreementLimits']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the BillingAgreementLimits and returns this instance - * - * @param OffAmazonPaymentsNotifications_Model_BillingAgreementLimits $value BillingAgreementLimits - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getSellerBillingAgreementAttributes () - { - return $this->fields['SellerBillingAgreementAttributes']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Checks if BillingAgreementLimits is set - * - * @return bool true if BillingAgreementLimits property is set","public function setSellerBillingAgreementAttributes ($value) - { - $this->fields['SellerBillingAgreementAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Gets the value of the SellerBillingAgreementAttributes. - * - * @return OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes SellerBillingAgreementAttributes","public function withSellerBillingAgreementAttributes ($value) - { - $this->setSellerBillingAgreementAttributes($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the SellerBillingAgreementAttributes. - * - * @param OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes SellerBillingAgreementAttributes - * @return void","public function isSetSellerBillingAgreementAttributes () - { - return ! is_null($this->fields['SellerBillingAgreementAttributes']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the SellerBillingAgreementAttributes and returns this instance - * - * @param OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes $value SellerBillingAgreementAttributes - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementDetails instance","public function getBillingAgreementStatus () - { - return $this->fields['BillingAgreementStatus']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Checks if SellerBillingAgreementAttributes is set - * - * @return bool true if SellerBillingAgreementAttributes property is set","public function setBillingAgreementStatus ($value) - { - $this->fields['BillingAgreementStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Gets the value of the BillingAgreementStatus. - * - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementStatus BillingAgreementStatus","public function withBillingAgreementStatus ($value) - { - $this->setBillingAgreementStatus($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the BillingAgreementStatus. - * - * @param OffAmazonPaymentsNotifications_Model_BillingAgreementStatus BillingAgreementStatus - * @return void","public function isSetBillingAgreementStatus () - { - return ! is_null($this->fields['BillingAgreementStatus']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the BillingAgreementStatus and returns this instance - * - * @param OffAmazonPaymentsNotifications_Model_BillingAgreementStatus $value BillingAgreementStatus - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementDetails instance","public function getCreationTimestamp () - { - return $this->fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Checks if BillingAgreementStatus is set - * - * @return bool true if BillingAgreementStatus property is set","public function setCreationTimestamp ($value) - { - $this->fields['CreationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Gets the value of the CreationTimestamp property. - * - * @return string CreationTimestamp","public function withCreationTimestamp ($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the CreationTimestamp property. - * - * @param string CreationTimestamp - * @return $this instance","public function isSetCreationTimestamp () - { - return ! is_null($this->fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the CreationTimestamp and returns this instance - * - * @param string $value CreationTimestamp - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementDetails instance","public function getBillingAgreementConsent () - { - return $this->fields['BillingAgreementConsent']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp is set","public function setBillingAgreementConsent ($value) - { - $this->fields['BillingAgreementConsent']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Gets the value of the BillingAgreementConsent property. - * - * @return bool BillingAgreementConsent","public function withBillingAgreementConsent ($value) - { - $this->setBillingAgreementConsent($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreement,"* Sets the value of the BillingAgreementConsent property. - * - * @param bool BillingAgreementConsent - * @return $this instance","public function isSetBillingAgreementConsent () - { - return ! is_null($this->fields['BillingAgreementConsent']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->fields = array( - - 'AmountLimitPerTimePeriod' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ), - - 'TimePeriodStartDate' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'TimePeriodEndDate' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'CurrentRemainingBalance' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* OffAmazonPaymentsNotifications_Model_BillingAgreementLimits - * - * Properties: - * ","public function getAmountLimitPerTimePeriod () - { - return $this->fields['AmountLimitPerTimePeriod']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Construct new OffAmazonPaymentsNotifications_Model_BillingAgreementLimits - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmountLimitPerTimePeriod ($value) - { - $this->fields['AmountLimitPerTimePeriod']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Gets the value of the AmountLimitPerTimePeriod. - * - * @return OffAmazonPaymentsNotifications_Model_Price AmountLimitPerTimePeriod","public function withAmountLimitPerTimePeriod ($value) - { - $this->setAmountLimitPerTimePeriod($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Sets the value of the AmountLimitPerTimePeriod. - * - * @param OffAmazonPaymentsNotifications_Model_Price AmountLimitPerTimePeriod - * @return void","public function isSetAmountLimitPerTimePeriod () - { - return ! is_null($this->fields['AmountLimitPerTimePeriod']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Sets the value of the AmountLimitPerTimePeriod and returns this instance - * - * @param OffAmazonPaymentsNotifications_Model_Price $value AmountLimitPerTimePeriod - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementLimits instance","public function getTimePeriodStartDate () - { - return $this->fields['TimePeriodStartDate']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Checks if AmountLimitPerTimePeriod is set - * - * @return bool true if AmountLimitPerTimePeriod property is set","public function setTimePeriodStartDate ($value) - { - $this->fields['TimePeriodStartDate']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Gets the value of the TimePeriodStartDate property. - * - * @return string TimePeriodStartDate","public function withTimePeriodStartDate ($value) - { - $this->setTimePeriodStartDate($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Sets the value of the TimePeriodStartDate property. - * - * @param string TimePeriodStartDate - * @return $this instance","public function isSetTimePeriodStartDate () - { - return ! is_null($this->fields['TimePeriodStartDate']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Sets the value of the TimePeriodStartDate and returns this instance - * - * @param string $value TimePeriodStartDate - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementLimits instance","public function getTimePeriodEndDate () - { - return $this->fields['TimePeriodEndDate']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Checks if TimePeriodStartDate is set - * - * @return bool true if TimePeriodStartDate is set","public function setTimePeriodEndDate ($value) - { - $this->fields['TimePeriodEndDate']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Gets the value of the TimePeriodEndDate property. - * - * @return string TimePeriodEndDate","public function withTimePeriodEndDate ($value) - { - $this->setTimePeriodEndDate($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Sets the value of the TimePeriodEndDate property. - * - * @param string TimePeriodEndDate - * @return $this instance","public function isSetTimePeriodEndDate () - { - return ! is_null($this->fields['TimePeriodEndDate']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Sets the value of the TimePeriodEndDate and returns this instance - * - * @param string $value TimePeriodEndDate - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementLimits instance","public function getCurrentRemainingBalance () - { - return $this->fields['CurrentRemainingBalance']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Checks if TimePeriodEndDate is set - * - * @return bool true if TimePeriodEndDate is set","public function setCurrentRemainingBalance ($value) - { - $this->fields['CurrentRemainingBalance']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Gets the value of the CurrentRemainingBalance. - * - * @return OffAmazonPaymentsNotifications_Model_Price CurrentRemainingBalance","public function withCurrentRemainingBalance ($value) - { - $this->setCurrentRemainingBalance($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementLimits,"* Sets the value of the CurrentRemainingBalance. - * - * @param OffAmazonPaymentsNotifications_Model_Price CurrentRemainingBalance - * @return void","public function isSetCurrentRemainingBalance () - { - return ! is_null($this->fields['CurrentRemainingBalance']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ( - OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, $data = null) - { - $this->fields = array( - 'BillingAgreement' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_BillingAgreement' - ) - ); - parent::__construct($notificationMetadata, ""BillingAgreementNotification"", $data); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,"* OffAmazonPaymentsNotifications_Model_BillingAgreementNotification - * - * Properties: - * ","public function getBillingAgreement () - { - return $this->fields['BillingAgreement']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,"* Construct new OffAmazonPaymentsNotifications_Model_BillingAgreementNotification - * - * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request - * @param mixed $data DOMElement or Associative Array - * to construct from. - * - * Valid properties: - * ","public function setBillingAgreement ($value) - { - $this->fields['BillingAgreement']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,"* Construct OffAmazonPaymentsNotifications_Model_BillingAgreementNotification - * from XML string - * - * @param string $xml XML string to construct from - * - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementNotification","public function withBillingAgreement ($value) - { - $this->setBillingAgreement($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,"* Gets the value of the BillingAgreement. - * - * @return BillingAgreement property value","public function isSetBillingAgreement () - { - return ! is_null($this->fields['BillingAgreement']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementNotification,"* Sets the value of the BillingAgreement. - * - * @param BillingAgreement $value new value - * - * @return void","public function toXML () - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->fields = array( - 'State' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'LastUpdateTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ReasonCode' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ReasonDescription' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* OffAmazonPaymentsNotifications_Model_BillingAgreementStatus - * - * Properties: - * ","public function getState () - { - return $this->fields['State']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Construct new OffAmazonPaymentsNotifications_Model_BillingAgreementStatus - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setState ($value) - { - $this->fields['State']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Gets the value of the State property. - * - * @return string State","public function withState ($value) - { - $this->setState($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Sets the value of the State property. - * - * @param string State - * @return $this instance","public function isSetState () - { - return ! is_null($this->fields['State']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Sets the value of the State and returns this instance - * - * @param string $value State - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementStatus instance","public function getLastUpdateTimestamp () - { - return $this->fields['LastUpdateTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Checks if State is set - * - * @return bool true if State is set","public function setLastUpdateTimestamp ($value) - { - $this->fields['LastUpdateTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Gets the value of the LastUpdateTimestamp property. - * - * @return string LastUpdateTimestamp","public function withLastUpdateTimestamp ($value) - { - $this->setLastUpdateTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Sets the value of the LastUpdateTimestamp property. - * - * @param string LastUpdateTimestamp - * @return $this instance","public function isSetLastUpdateTimestamp () - { - return ! is_null($this->fields['LastUpdateTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Sets the value of the LastUpdateTimestamp and returns this instance - * - * @param string $value LastUpdateTimestamp - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementStatus instance","public function getReasonCode () - { - return $this->fields['ReasonCode']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Checks if LastUpdateTimestamp is set - * - * @return bool true if LastUpdateTimestamp is set","public function setReasonCode ($value) - { - $this->fields['ReasonCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Gets the value of the ReasonCode property. - * - * @return string ReasonCode","public function withReasonCode ($value) - { - $this->setReasonCode($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Sets the value of the ReasonCode property. - * - * @param string ReasonCode - * @return $this instance","public function isSetReasonCode () - { - return ! is_null($this->fields['ReasonCode']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Sets the value of the ReasonCode and returns this instance - * - * @param string $value ReasonCode - * @return OffAmazonPaymentsNotifications_Model_BillingAgreementStatus instance","public function getReasonDescription () - { - return $this->fields['ReasonDescription']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Checks if ReasonCode is set - * - * @return bool true if ReasonCode is set","public function setReasonDescription ($value) - { - $this->fields['ReasonDescription']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Gets the value of the ReasonDescription property. - * - * @return string ReasonDescription","public function withReasonDescription ($value) - { - $this->setReasonDescription($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_BillingAgreementStatus,"* Sets the value of the ReasonDescription property. - * - * @param string ReasonDescription - * @return $this instance","public function isSetReasonDescription () - { - return ! is_null($this->fields['ReasonDescription']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'AmazonCaptureId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'CaptureReferenceId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'CaptureAmount' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ), - 'RefundedAmount' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ), - 'CaptureFee' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ), - 'IdList' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_IdList' - ), - 'CreationTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'CaptureStatus' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status' - ), - 'SoftDescriptor' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* OffAmazonPaymentsNotifications_Model_CaptureDetails - * - * Properties: - * ","public function getAmazonCaptureId() - { - return $this->fields['AmazonCaptureId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Construct new OffAmazonPaymentsNotifications_Model_CaptureDetails - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmazonCaptureId($value) - { - $this->fields['AmazonCaptureId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Gets the value of the AmazonCaptureId property. - * - * @return string AmazonCaptureId","public function withAmazonCaptureId($value) - { - $this->setAmazonCaptureId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the AmazonCaptureId property. - * - * @param string $value AmazonCaptureId - * - * @return this instance","public function isSetAmazonCaptureId() - { - return !is_null($this->fields['AmazonCaptureId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the AmazonCaptureId and returns this instance - * - * @param string $value AmazonCaptureId - * - * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance","public function getCaptureReferenceId() - { - return $this->fields['CaptureReferenceId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Checks if AmazonCaptureId is set - * - * @return bool true if AmazonCaptureId is set","public function setCaptureReferenceId($value) - { - $this->fields['CaptureReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Gets the value of the CaptureReferenceId property. - * - * @return string CaptureReferenceId","public function withCaptureReferenceId($value) - { - $this->setCaptureReferenceId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CaptureReferenceId property. - * - * @param string $value CaptureReferenceId - * - * @return this instance","public function isSetCaptureReferenceId() - { - return !is_null($this->fields['CaptureReferenceId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CaptureReferenceId and returns this instance - * - * @param string $value CaptureReferenceId - * - * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance","public function getCaptureAmount() - { - return $this->fields['CaptureAmount']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Checks if CaptureReferenceId is set - * - * @return bool true if CaptureReferenceId is set","public function setCaptureAmount($value) - { - $this->fields['CaptureAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Gets the value of the CaptureAmount. - * - * @return Price CaptureAmount","public function withCaptureAmount($value) - { - $this->setCaptureAmount($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CaptureAmount. - * - * @param Price $value CaptureAmount - * - * @return void","public function isSetCaptureAmount() - { - return !is_null($this->fields['CaptureAmount']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CaptureAmount and returns this instance - * - * @param Price $value CaptureAmount - * - * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance","public function getRefundedAmount() - { - return $this->fields['RefundedAmount']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Checks if CaptureAmount is set - * - * @return bool true if CaptureAmount property is set","public function setRefundedAmount($value) - { - $this->fields['RefundedAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Gets the value of the RefundedAmount. - * - * @return Price RefundedAmount","public function withRefundedAmount($value) - { - $this->setRefundedAmount($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the RefundedAmount. - * - * @param Price $value RefundedAmount - * - * @return void","public function isSetRefundedAmount() - { - return !is_null($this->fields['RefundedAmount']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the RefundedAmount and returns this instance - * - * @param Price $value RefundedAmount - * - * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance","public function getCaptureFee() - { - return $this->fields['CaptureFee']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Checks if RefundedAmount is set - * - * @return bool true if RefundedAmount property is set","public function setCaptureFee($value) - { - $this->fields['CaptureFee']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Gets the value of the CaptureFee. - * - * @return Price CaptureFee","public function withCaptureFee($value) - { - $this->setCaptureFee($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CaptureFee. - * - * @param Price $value CaptureFee - * - * @return void","public function isSetCaptureFee() - { - return !is_null($this->fields['CaptureFee']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CaptureFee and returns this instance - * - * @param Price $value CaptureFee - * - * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance","public function getIdList() - { - return $this->fields['IdList']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Checks if CaptureFee is set - * - * @return bool true if CaptureFee property is set","public function setIdList($value) - { - $this->fields['IdList']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Gets the value of the IdList. - * - * @return IdList IdList","public function withIdList($value) - { - $this->setIdList($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the IdList. - * - * @param IdList $value IdList - * - * @return void","public function isSetIdList() - { - return !is_null($this->fields['IdList']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the IdList and returns this instance - * - * @param IdList $value IdList - * - * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance","public function getCreationTimestamp() - { - return $this->fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Checks if IdList is set - * - * @return bool true if IdList property is set","public function setCreationTimestamp($value) - { - $this->fields['CreationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Gets the value of the CreationTimestamp property. - * - * @return string CreationTimestamp","public function withCreationTimestamp($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CreationTimestamp property. - * - * @param string $value CreationTimestamp - * - * @return this instance","public function isSetCreationTimestamp() - { - return !is_null($this->fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CreationTimestamp and returns this instance - * - * @param string $value CreationTimestamp - * - * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance","public function getCaptureStatus() - { - return $this->fields['CaptureStatus']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp is set","public function setCaptureStatus($value) - { - $this->fields['CaptureStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Gets the value of the CaptureStatus. - * - * @return OffAmazonPaymentsNotifications_Model_Status CaptureStatus","public function withCaptureStatus($value) - { - $this->setCaptureStatus($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CaptureStatus. - * - * @param Status $value CaptureStatus - * - * @return void","public function isSetCaptureStatus() - { - return !is_null($this->fields['CaptureStatus']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the CaptureStatus and returns this instance - * - * @param Status $value CaptureStatus - * - * @return OffAmazonPaymentsNotifications_Model_CaptureDetails instance","public function getSoftDescriptor() - { - return $this->fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Checks if CaptureStatus is set - * - * @return bool true if CaptureStatus property is set","public function setSoftDescriptor($value) - { - $this->fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function withSoftDescriptor($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureDetails,"* Sets the value of the SoftDescriptor property. - * - * @param string $value SoftDescriptor - * - * @return this instance","public function isSetSoftDescriptor() - { - return !is_null($this->fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_CaptureNotification,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, - $data = null - ) { - $this->fields = array ( - 'CaptureDetails' => array( - 'FieldValue' => null, - 'FieldType' => - 'OffAmazonPaymentsNotifications_Model_CaptureDetails' - ) - ); - parent::__construct( - $notificationMetadata, - ""CaptureNotification"", - $data - ); - }" -OffAmazonPaymentsNotifications_Model_CaptureNotification,"* OffAmazonPaymentsNotifications_Model_CaptureNotification - * - * Properties: - * ","public function getCaptureDetails() - { - return $this->fields['CaptureDetails']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_CaptureNotification,"* Construct new OffAmazonPaymentsNotifications_Model_CaptureNotification - * - * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request - * @param mixed $data DOMElement or Associative Array - * to construct from. - * - * Valid properties: - * ","public function setCaptureDetails($value) - { - $this->fields['CaptureDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_CaptureNotification,"* Construct OffAmazonPaymentsNotifications_Model_CaptureNotification - * from XML string - * - * @param string $xml XML string to construct from - * - * @return OffAmazonPaymentsNotifications_Model_CaptureNotification","public function withCaptureDetails($value) - { - $this->setCaptureDetails($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_CaptureNotification,"* Gets the value of the CaptureNotification. - * - * @return OffAmazonPaymentsNotifications_Model_CaptureDetails property value","public function isSetCaptureDetails() - { - return !is_null($this->fields['CaptureDetails']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_CaptureNotification,"* Sets the value of the CaptureDetails. - * - * @param OrderReference $value new value - * - * @return void","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsNotifications_Model_IdList,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'Id' => array('FieldValue' => array(), 'FieldType' => array('string')), - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_IdList,"* OffAmazonPaymentsNotifications_Model_IdList - * - * Properties: - * ","public function getId() - { - return $this->fields['Id']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_IdList,"* Construct new OffAmazonPaymentsNotifications_Model_IdList - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setId($Id) - { - if (!$this->_isNumericArray($Id)) { - $Id = array ($Id); - }" -OffAmazonPaymentsNotifications_Model_IdList,"* Gets the value of the Id . - * - * @return array of string Id","public function withId($stringArgs) - { - foreach (func_get_args() as $Id) { - $this->fields['Id']['FieldValue'][] = $Id; - }" -OffAmazonPaymentsNotifications_Model_IdList,"* Sets the value of the Id. - * - * @param string|array $Id string or array of string Ids - * - * @return this instance","public function isSetId() - { - return count($this->fields['Id']['FieldValue']) > 0; - }" -OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - Message $message, - OffAmazonPaymentsNotifications_NotificationMetadata $parentNotificationMetadata = null - ) { - $this->_timestamp - = $message->getMandatoryField(""Timestamp""); - $this->_releaseEnvironment - = $message->getMandatoryField(""ReleaseEnvironment""); - $this->_notificationReferenceId - = $message->getMandatoryField(""NotificationReferenceId""); - parent::__construct($parentNotificationMetadata); - }" -OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,* IPN Message information,"public function getTimestamp() - { - return $this->_timestamp; - }" -OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,"* Timestamp for when this notification was generated - * - * @var string","public function getNotificationReferenceId() - { - return $this->_notificationReferenceId; - }" -OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,"* Environment in which this notification was sent from - * - * @var string","public function getReleaseEnvironment() - { - return $this->_releaseEnvironment; - }" -OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata,"* Identification for the reference id - * - * @var string","public function getNotificationMetadataType() - { - return self::SOURCE_MESSAGE_TYPE; - }" -OffAmazonPaymentsNotifications_NotificationImpl,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, - $notificationType, - $data = null - ) { - $this->_notificationMetadata = $notificationMetadata; - $this->_notificationType = $notificationType; - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_NotificationImpl,"* NotificationsImpl class, contains common functionality for - * an implementation of the notification interface - *","public function getNotificationType() - { - return $this->_notificationType; - }" -OffAmazonPaymentsNotifications_NotificationImpl,* Metadata about the notification request,"public function getNotificationMetadata() - { - return $this->_notificationMetadata; - }" -OffAmazonPaymentsNotifications_Model_NotificationMetadataImpl,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($parentNotificationMetadata = null) - { - $this->_parentNotificationMetadata = $parentNotificationMetadata; - }" -OffAmazonPaymentsNotifications_Model_NotificationMetadataImpl,"* Common functions for classes that extend the message information - * class - *","public function getParentNotificationMetadata() - { - return $this->_parentNotificationMetadata; - }" -OffAmazonPaymentsNotifications_Model_NotificationMetadataImpl,"* Parent message if applicable, null otherwise - * - * @var object","public function hasParentNotificationMetadata() - { - return !is_null($this->_parentNotificationMetadata); - }" -OffAmazonPaymentsNotifications_Model_OrderItemCategories,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'OrderItemCategory' => - array('FieldValue' => array(), 'FieldType' => array('string')), - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_OrderItemCategories,"* OffAmazonPaymentsNotifications_Model_OrderItemCategories - * - * Properties: - * ","public function getOrderItemCategory() - { - return $this->fields['OrderItemCategory']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderItemCategories,"* Construct new OffAmazonPaymentsNotifications_Model_OrderItemCategories - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setOrderItemCategory($orderItemCategory) - { - if (!$this->_isNumericArray($orderItemCategory)) { - $orderItemCategory = array ($orderItemCategory); - }" -OffAmazonPaymentsNotifications_Model_OrderItemCategories,"* Gets the value of the OrderItemCategory . - * - * @return array of string OrderItemCategory","public function withOrderItemCategory($stringArgs) - { - foreach (func_get_args() as $orderItemCategory) { - $this->fields['OrderItemCategory']['FieldValue'][] = $orderItemCategory; - }" -OffAmazonPaymentsNotifications_Model_OrderItemCategories,"* Sets the value of the OrderItemCategory. - * - * @param string|array $orderItemCategory string or an array - * of string OrderItemCategory - * - * @return this instance","public function isSetOrderItemCategory() - { - return count($this->fields['OrderItemCategory']['FieldValue']) > 0; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'AmazonOrderReferenceId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'OrderTotal' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_OrderTotal' - ), - 'SellerOrderAttributes' => array( - 'FieldValue' => null, - 'FieldType' - => 'OffAmazonPaymentsNotifications_Model_SellerOrderAttributes' - ), - 'OrderReferenceStatus' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_OrderReferenceStatus' - ), - 'CreationTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ExpirationTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* OffAmazonPaymentsNotifications_Model_OrderReference - * - * Properties: - * ","public function getAmazonOrderReferenceId() - { - return $this->fields['AmazonOrderReferenceId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Construct new OffAmazonPaymentsNotifications_Model_OrderReference - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmazonOrderReferenceId($value) - { - $this->fields['AmazonOrderReferenceId']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Gets the value of the AmazonOrderReferenceId. - * - * @return string property value","public function withAmazonOrderReferenceId($value) - { - $this->setAmazonOrderReferenceId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the AmazonOrderReferenceId. - * - * @param string $value new value - * - * @return void","public function isSetAmazonOrderReferenceId() - { - return !is_null($this->fields['AmazonOrderReferenceId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the AmazonOrderReferenceId - * and returns this instance - * - * @param string $value AmazonOrderReferenceId - * - * @return OffAmazonPaymentsServices_Model_OrderReference instance","public function getOrderTotal() - { - return $this->fields['OrderTotal']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Checks if AmazonOrderReferenceId is set - * - * @return bool true if AmazonOrderReferenceId property is set","public function setOrderTotal($value) - { - $this->fields['OrderTotal']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Gets the value of the OrderTotal. - * - * @return string property value","public function withOrderTotal($value) - { - $this->setOrderTotal($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the OrderTotal. - * - * @param string $value new value - * - * @return void","public function isSetOrderTotal() - { - return !is_null($this->fields['OrderTotal']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the OrderTotal - * and returns this instance - * - * @param string $value OrderTotal - * - * @return OffAmazonPaymentsServices_Model_OrderReference instance","public function getSellerOrderAttributes() - { - return $this->fields['SellerOrderAttributes']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Checks if OrderTotal is set - * - * @return bool true if OrderTotal property is set","public function setSellerOrderAttributes($value) - { - $this->fields['SellerOrderAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Gets the value of the SellerOrderAttributes. - * - * @return string property value","public function withSellerOrderAttributes($value) - { - $this->setSellerOrderAttributes($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the SellerOrderAttributes. - * - * @param string $value new value - * - * @return void","public function isSetSellerOrderAttributes() - { - return !is_null($this->fields['SellerOrderAttributes']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the SellerOrderAttributes - * and returns this instance - * - * @param string $value SellerOrderAttributes - * - * @return OffAmazonPaymentsServices_Model_OrderReference instance","public function getOrderReferenceStatus() - { - return $this->fields['OrderReferenceStatus']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Checks if SellerOrderAttributes is set - * - * @return bool true if SellerOrderAttributes property is set","public function setOrderReferenceStatus($value) - { - $this->fields['OrderReferenceStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Gets the value of the OrderReferenceStatus. - * - * @return OffAmazonPaymentsNotifications_Model_OrderReferenceStatus","public function withOrderReferenceStatus($value) - { - $this->setOrderReferenceStatus($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the OrderReferenceStatus. - * - * @param string $value new value - * - * @return void","public function isSetOrderReferenceStatus() - { - return !is_null($this->fields['OrderReferenceStatus']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the OrderReferenceStatus - * and returns this instance - * - * @param string $value OrderReferenceStatus - * - * @return OffAmazonPaymentsServices_Model_OrderReference instance","public function getCreationTimestamp() - { - return $this->fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Checks if OrderReferenceStatus is set - * - * @return bool true if OrderReferenceStatus property is set","public function setCreationTimestamp($value) - { - $this->fields['CreationTimestamp']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Gets the value of the CreationTimestamp. - * - * @return string property value","public function withCreationTimestamp($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the CreationTimestamp. - * - * @param string $value new value - * - * @return void","public function isSetCreationTimestamp() - { - return !is_null($this->fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the CreationTimestamp - * and returns this instance - * - * @param string $value CreationTimestamp - * - * @return OffAmazonPaymentsServices_Model_OrderReference instance","public function getExpirationTimestamp() - { - return $this->fields['ExpirationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp property is set","public function setExpirationTimestamp($value) - { - $this->fields['ExpirationTimestamp']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Gets the value of the ExpirationTimestamp. - * - * @return string property value","public function withExpirationTimestamp($value) - { - $this->setExpirationTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReference,"* Sets the value of the ExpirationTimestamp. - * - * @param string $value new value - * - * @return void","public function isSetExpirationTimestamp() - { - return !is_null($this->fields['ExpirationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, - $data = null - ) { - $this->fields = array ( - 'OrderReference' => array( - 'FieldValue' => null, - 'FieldType' => - 'OffAmazonPaymentsNotifications_Model_OrderReference' - ) - ); - parent::__construct( - $notificationMetadata, - ""OrderReferenceNotification"", - $data - ); - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,"* OffAmazonPaymentsNotifications_Model_OrderReferenceNotification - * - * Properties: - * ","public function getOrderReference() - { - return $this->fields['OrderReference']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,"* Construct new OffAmazonPaymentsNotifications_Model_OrderReferenceNotification - * - * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request - * @param mixed $data DOMElement or Associative Array - * to construct from. - * - * Valid properties: - * ","public function setOrderReference($value) - { - $this->fields['OrderReference']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,"* Construct OffAmazonPaymentsNotifications_Model_OrderReferenceNotification - * from XML string - * - * @param string $xml XML string to construct from - * - * @return OffAmazonPaymentsNotifications_Model_OrderReferenceNotification","public function withOrderReference($value) - { - $this->setOrderReference($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,"* Gets the value of the OrderReference. - * - * @return OffAmazonPaymentsNotifications_Model_OrderReference property value","public function isSetOrderReference() - { - return !is_null($this->fields['OrderReference']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceNotification,"* Sets the value of the OrderReference. - * - * @param OrderReference $value new value - * - * @return void","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'State' => array('FieldValue' => null, 'FieldType' => 'string'), - 'LastUpdateTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ReasonCode' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ReasonDescription' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* OffAmazonPaymentsNotifications_Model_OrderReferenceStatus - * - * Properties: - * ","public function getState() - { - return $this->fields['State']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Construct new OffAmazonPaymentsNotifications_Model_OrderReferenceStatus - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setState($value) - { - $this->fields['State']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Gets the value of the State property. - * - * @return string State","public function withState($value) - { - $this->setState($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Sets the value of the State property. - * - * @param string State - * @return this instance","public function isSetState() - { - return !is_null($this->fields['State']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Sets the value of the State and returns this instance - * - * @param string $value State - * @return OffAmazonPaymentsNotifications_Model_OrderReferenceStatus instance","public function getLastUpdateTimestamp() - { - return $this->fields['LastUpdateTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Checks if State is set - * - * @return bool true if State is set","public function setLastUpdateTimestamp($value) - { - $this->fields['LastUpdateTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Gets the value of the LastUpdateTimestamp property. - * - * @return string LastUpdateTimestamp","public function withLastUpdateTimestamp($value) - { - $this->setLastUpdateTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Sets the value of the LastUpdateTimestamp property. - * - * @param string LastUpdateTimestamp - * @return this instance","public function isSetLastUpdateTimestamp() - { - return !is_null($this->fields['LastUpdateTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Sets the value of the LastUpdateTimestamp and returns this instance - * - * @param string $value LastUpdateTimestamp - * @return OffAmazonPaymentsNotifications_Model_OrderReferenceStatus instance","public function getReasonCode() - { - return $this->fields['ReasonCode']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Checks if LastUpdateTimestamp is set - * - * @return bool true if LastUpdateTimestamp is set","public function setReasonCode($value) - { - $this->fields['ReasonCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Gets the value of the ReasonCode property. - * - * @return string ReasonCode","public function withReasonCode($value) - { - $this->setReasonCode($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Sets the value of the ReasonCode property. - * - * @param string ReasonCode - * @return this instance","public function isSetReasonCode() - { - return !is_null($this->fields['ReasonCode']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Sets the value of the ReasonCode and returns this instance - * - * @param string $value ReasonCode - * @return OffAmazonPaymentsNotifications_Model_OrderReferenceStatus instance","public function getReasonDescription() - { - return $this->fields['ReasonDescription']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Checks if ReasonCode is set - * - * @return bool true if ReasonCode is set","public function setReasonDescription($value) - { - $this->fields['ReasonDescription']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Gets the value of the ReasonDescription property. - * - * @return string ReasonDescription","public function withReasonDescription($value) - { - $this->setReasonDescription($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderReferenceStatus,"* Sets the value of the ReasonDescription property. - * - * @param string ReasonDescription - * @return this instance","public function isSetReasonDescription() - { - return !is_null($this->fields['ReasonDescription']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderTotal,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'CurrencyCode' => array('FieldValue' => null, 'FieldType' => 'string'), - 'Amount' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_OrderTotal,"* OffAmazonPaymentsNotifications_Model_OrderTotal - * - * Properties: - * ","public function getCurrencyCode() - { - return $this->fields['CurrencyCode']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderTotal,"* Construct new OffAmazonPaymentsNotifications_Model_OrderTotal - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setCurrencyCode($value) - { - $this->fields['CurrencyCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderTotal,"* Gets the value of the CurrencyCode property. - * - * @return string CurrencyCode","public function withCurrencyCode($value) - { - $this->setCurrencyCode($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderTotal,"* Sets the value of the CurrencyCode property. - * - * @param string $value CurrencyCode - * - * @return this instance","public function isSetCurrencyCode() - { - return !is_null($this->fields['CurrencyCode']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_OrderTotal,"* Sets the value of the CurrencyCode and returns this instance - * - * @param string $value CurrencyCode - * - * @return OffAmazonPaymentsNotifications_Model_OrderTotal instance","public function getAmount() - { - return $this->fields['Amount']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_OrderTotal,"* Checks if CurrencyCode is set - * - * @return bool true if CurrencyCode is set","public function setAmount($value) - { - $this->fields['Amount']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderTotal,"* Gets the value of the Amount property. - * - * @return string Amount","public function withAmount($value) - { - $this->setAmount($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_OrderTotal,"* Sets the value of the Amount property. - * - * @param string $value Amount - * - * @return this instance","public function isSetAmount() - { - return !is_null($this->fields['Amount']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_Price,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'Amount' => array('FieldValue' => null, 'FieldType' => 'string'), - 'CurrencyCode' => array('FieldValue' => null, 'FieldType' => 'string') - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_Price,"* OffAmazonPaymentsNotifications_Model_Price - * - * Properties: - * ","public function getAmount() - { - return $this->fields['Amount']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_Price,"* Construct new OffAmazonPaymentsNotifications_Model_Price - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmount($value) - { - $this->fields['Amount']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_Price,"* Gets the value of the Amount property. - * - * @return string Amount","public function withAmount($value) - { - $this->setAmount($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_Price,"* Sets the value of the Amount property. - * - * @param string $value Amount - * - * @return this instance","public function isSetAmount() - { - return !is_null($this->fields['Amount']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_Price,"* Sets the value of the Amount and returns this instance - * - * @param string $value Amount - * - * @return OffAmazonPaymentsNotifications_Model_Price instance","public function getCurrencyCode() - { - return $this->fields['CurrencyCode']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_Price,"* Checks if Amount is set - * - * @return bool true if Amount is set","public function setCurrencyCode($value) - { - $this->fields['CurrencyCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_Price,"* Gets the value of the CurrencyCode property. - * - * @return string CurrencyCode","public function withCurrencyCode($value) - { - $this->setCurrencyCode($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_Price,"* Sets the value of the CurrencyCode property. - * - * @param string $value CurrencyCode - * - * @return this instance","public function isSetCurrencyCode() - { - return !is_null($this->fields['CurrencyCode']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'AmazonRefundId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'RefundReferenceId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'RefundType' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'RefundAmount' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ), - 'FeeRefunded' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Price' - ), - 'CreationTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'RefundStatus' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsNotifications_Model_Status' - ), - 'SoftDescriptor' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* OffAmazonPaymentsNotifications_Model_RefundDetails - * - * Properties: - * ","public function getAmazonRefundId() - { - return $this->fields['AmazonRefundId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Construct new OffAmazonPaymentsNotifications_Model_RefundDetails - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmazonRefundId($value) - { - $this->fields['AmazonRefundId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Gets the value of the AmazonRefundId property. - * - * @return string AmazonRefundId","public function withAmazonRefundId($value) - { - $this->setAmazonRefundId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the AmazonRefundId property. - * - * @param string $value AmazonRefundId - * - * @return this instance","public function isSetAmazonRefundId() - { - return !is_null($this->fields['AmazonRefundId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the AmazonRefundId and returns this instance - * - * @param string $value AmazonRefundId - * - * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance","public function getRefundReferenceId() - { - return $this->fields['RefundReferenceId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Checks if AmazonRefundId is set - * - * @return bool true if AmazonRefundId is set","public function setRefundReferenceId($value) - { - $this->fields['RefundReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Gets the value of the RefundReferenceId property. - * - * @return string RefundReferenceId","public function withRefundReferenceId($value) - { - $this->setRefundReferenceId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the RefundReferenceId property. - * - * @param string $value RefundReferenceId - * - * @return this instance","public function isSetRefundReferenceId() - { - return !is_null($this->fields['RefundReferenceId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the RefundReferenceId and returns this instance - * - * @param string $value RefundReferenceId - * - * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance","public function getRefundType() - { - return $this->fields['RefundType']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Checks if RefundReferenceId is set - * - * @return bool true if RefundReferenceId is set","public function setRefundType($value) - { - $this->fields['RefundType']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Gets the value of the RefundType property. - * - * @return string RefundType","public function withRefundType($value) - { - $this->setRefundType($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the RefundType property. - * - * @param string $value RefundType - * - * @return this instance","public function isSetRefundType() - { - return !is_null($this->fields['RefundType']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the RefundType and returns this instance - * - * @param string $value RefundType - * - * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance","public function getRefundAmount() - { - return $this->fields['RefundAmount']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Checks if RefundType is set - * - * @return bool true if RefundType is set","public function setRefundAmount($value) - { - $this->fields['RefundAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Gets the value of the RefundAmount. - * - * @return Price RefundAmount","public function withRefundAmount($value) - { - $this->setRefundAmount($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the RefundAmount. - * - * @param Price $value RefundAmount - * - * @return void","public function isSetRefundAmount() - { - return !is_null($this->fields['RefundAmount']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the RefundAmount and returns this instance - * - * @param Price $value RefundAmount - * - * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance","public function getFeeRefunded() - { - return $this->fields['FeeRefunded']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Checks if RefundAmount is set - * - * @return bool true if RefundAmount property is set","public function setFeeRefunded($value) - { - $this->fields['FeeRefunded']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Gets the value of the FeeRefunded. - * - * @return Price FeeRefunded","public function withFeeRefunded($value) - { - $this->setFeeRefunded($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the FeeRefunded. - * - * @param Price $value FeeRefunded - * - * @return void","public function isSetFeeRefunded() - { - return !is_null($this->fields['FeeRefunded']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the FeeRefunded and returns this instance - * - * @param Price $value FeeRefunded - * - * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance","public function getCreationTimestamp() - { - return $this->fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Checks if FeeRefunded is set - * - * @return bool true if FeeRefunded property is set","public function setCreationTimestamp($value) - { - $this->fields['CreationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Gets the value of the CreationTimestamp property. - * - * @return string CreationTimestamp","public function withCreationTimestamp($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the CreationTimestamp property. - * - * @param string $value CreationTimestamp - * - * @return this instance","public function isSetCreationTimestamp() - { - return !is_null($this->fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the CreationTimestamp and returns this instance - * - * @param string $value CreationTimestamp - * - * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance","public function getRefundStatus() - { - return $this->fields['RefundStatus']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp is set","public function setRefundStatus($value) - { - $this->fields['RefundStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Gets the value of the RefundStatus. - * - * @return OffAmazonPaymentsNotifications_Model_Status RefundStatus","public function withRefundStatus($value) - { - $this->setRefundStatus($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the RefundStatus. - * - * @param Status $value RefundStatus - * - * @return void","public function isSetRefundStatus() - { - return !is_null($this->fields['RefundStatus']['FieldValue']); - - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the RefundStatus and returns this instance - * - * @param Status $value RefundStatus - * - * @return OffAmazonPaymentsNotifications_Model_RefundDetails instance","public function getSoftDescriptor() - { - return $this->fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Checks if RefundStatus is set - * - * @return bool true if RefundStatus property is set","public function setSoftDescriptor($value) - { - $this->fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function withSoftDescriptor($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundDetails,"* Sets the value of the SoftDescriptor property. - * - * @param string $value SoftDescriptor - * - * @return this instance","public function isSetSoftDescriptor() - { - return !is_null($this->fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_RefundNotification,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($notificationMetadata, $data = null) - { - $this->fields = array ( - 'RefundDetails' => array( - 'FieldValue' => null, - 'FieldType' => - 'OffAmazonPaymentsNotifications_Model_RefundDetails' - ) - ); - parent::__construct( - $notificationMetadata, - ""RefundNotification"", - $data - ); - }" -OffAmazonPaymentsNotifications_Model_RefundNotification,"* OffAmazonPaymentsNotifications_Model_RefundNotification - * - * Properties: - * ","public function getRefundDetails() - { - return $this->fields['RefundDetails']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_RefundNotification,"* Construct new OffAmazonPaymentsNotifications_Model_RefundNotification - * - * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request - * @param mixed $data DOMElement or Associative Array - * to construct from. - * - * Valid properties: - * ","public function setRefundDetails($value) - { - $this->fields['RefundDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_RefundNotification,"* Construct OffAmazonPaymentsNotifications_Model_RefundNotification - * from XML string - * - * @param string $xml XML string to construct from - * - * @return OffAmazonPaymentsNotifications_Model_RefundNotification","public function withRefundDetails($value) - { - $this->setRefundDetails($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_RefundNotification,"* Gets the value of the RefundNotification. - * - * @return OffAmazonPaymentsNotifications_Model_RefundDetails property value","public function isSetRefundDetails() - { - return !is_null($this->fields['RefundDetails']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_RefundNotification,"* Sets the value of the RefundDetails. - * - * @param OrderReference $value new value - * - * @return void","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->fields = array( - 'SellerId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'SellerBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,"* OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes - * - * Properties: - * ","public function getSellerBillingAgreementId () - { - return $this->fields['SellerBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,"* Construct new OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setSellerBillingAgreementId ($value) - { - $this->fields['SellerBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,"* Gets the value of the SellerBillingAgreementId property. - * - * @return string SellerBillingAgreementId","public function withSellerBillingAgreementId ($value) - { - $this->setSellerBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,"* Sets the value of the SellerBillingAgreementId property. - * - * @param string SellerBillingAgreementId - * @return this instance","public function isSetSellerBillingAgreementId () - { - return ! is_null($this->fields['SellerBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,"* Sets the value of the SellerBillingAgreementId and returns this instance - * - * @param string $value SellerBillingAgreementId - * @return OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes instance","public function getSellerId () - { - return $this->fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,"* Checks if SellerBillingAgreementId is set - * - * @return bool true if SellerBillingAgreementId is set","public function setSellerId ($value) - { - $this->fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function withSellerId ($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_SellerBillingAgreementAttributes,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function isSetSellerId () - { - return ! is_null($this->fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'SellerId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'SellerOrderId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'OrderItemCategories' => array( - 'FieldValue' => null, - 'FieldType' - => 'OffAmazonPaymentsNotifications_Model_OrderItemCategories' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* OffAmazonPaymentsNotifications_Model_SellerOrderAttributes - * - * Properties: - * ","public function getSellerId() - { - return $this->fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Construct new OffAmazonPaymentsNotifications_Model_SellerOrderAttributes - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setSellerId($value) - { - $this->fields['SellerId']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Gets the value of the SellerId. - * - * @return string property value","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Sets the value of the SellerId. - * - * @param string $value new value - * - * @return void","public function isSetSellerId() - { - return !is_null($this->fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Sets the value of the SellerId - * and returns this instance - * - * @param string $value SellerId - * - * @return OffAmazonPaymentsNotifications_Model_SellerOrderAttributes instance","public function getSellerOrderId() - { - return $this->fields['SellerOrderId']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Checks if SellerId is set - * - * @return bool true if SellerId property is set","public function setSellerOrderId($value) - { - $this->fields['SellerOrderId']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Gets the value of the SellerOrderId. - * - * @return string property value","public function withSellerOrderId($value) - { - $this->setSellerOrderId($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Sets the value of the SellerOrderId. - * - * @param string $value new value - * - * @return void","public function isSetSellerOrderId() - { - return !is_null($this->fields['SellerOrderId']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Sets the value of the SellerOrderId - * and returns this instance - * - * @param string $value SellerOrderId - * - * @return OffAmazonPaymentsNotifications_Model_SellerOrderAttributes instance","public function getOrderItemCategories() - { - return $this->fields['OrderItemCategories']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Checks if SellerOrderId is set - * - * @return bool true if SellerOrderId property is set","public function setOrderItemCategories($value) - { - $this->fields['OrderItemCategories']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Gets the value of the OrderItemCategories. - * - * @return string property value","public function withOrderItemCategories($value) - { - $this->setOrderItemCategories($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_SellerOrderAttributes,"* Sets the value of the OrderItemCategories. - * - * @param string $value new value - * - * @return void","public function isSetOrderItemCategories() - { - return !is_null($this->fields['OrderItemCategories']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - Message $message, - NotificationMetadata $parentNotificationMetadata = null - ) { - $this->_timestamp - = $message->getMandatoryField(""Timestamp""); - $this->_topicArn - = $message->getMandatoryField(""TopicArn""); - $this->_messageId - = $message->getMandatoryField(""MessageId""); - parent::__construct($parentNotificationMetadata); - }" -OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,* SNS Message information,"public function getTimestamp() - { - return $this->_timestamp; - }" -OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,"* Timestamp for when this notification was generated - * - * @var string","public function getTopicArn() - { - return $this->_topicArn; - }" -OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,"* Topic that the notification was generated from - * - * @var string","public function getMessageId() - { - return $this->_messageId; - }" -OffAmazonPaymentsNotifications_Model_SnsNotificationMetadata,"* Message id - * - * @var string","public function getNotificationMetadataType() - { - return self::SOURCE_MESSAGE_TYPE; - }" -OffAmazonPaymentsNotifications_Model_Status,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->fields = array ( - 'State' => array( - 'FieldValue' => null, - 'FieldType' => 'PaymentStatus' - ), - 'LastUpdateTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ReasonCode' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ReasonDescription' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsNotifications_Model_Status,"* OffAmazonPaymentsNotifications_Model_Status - * - * Properties: - * ","public function getState() - { - return $this->fields['State']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Construct new OffAmazonPaymentsNotifications_Model_Status - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setState($value) - { - $this->fields['State']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Gets the value of the State property. - * - * @return PaymentStatus State","public function withState($value) - { - $this->setState($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Sets the value of the State property. - * - * @param string $value State - * - * @return this instance","public function isSetState() - { - return !is_null($this->fields['State']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_Status,"* Sets the value of the State and returns this instance - * - * @param PaymentStatus $value State - * - * @return OffAmazonPaymentsNotifications_Model_Status instance","public function getLastUpdateTimestamp() - { - return $this->fields['LastUpdateTimestamp']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Checks if State is set - * - * @return bool true if State is set","public function setLastUpdateTimestamp($value) - { - $this->fields['LastUpdateTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Gets the value of the LastUpdateTimestamp property. - * - * @return string LastUpdateTimestamp","public function withLastUpdateTimestamp($value) - { - $this->setLastUpdateTimestamp($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Sets the value of the LastUpdateTimestamp property. - * - * @param string $value LastUpdateTimestamp - * - * @return this instance","public function isSetLastUpdateTimestamp() - { - return !is_null($this->fields['LastUpdateTimestamp']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_Status,"* Sets the value of the LastUpdateTimestamp and returns this instance - * - * @param string $value LastUpdateTimestamp - * - * @return OffAmazonPaymentsNotifications_Model_Status instance","public function getReasonCode() - { - return $this->fields['ReasonCode']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Checks if LastUpdateTimestamp is set - * - * @return bool true if LastUpdateTimestamp is set","public function setReasonCode($value) - { - $this->fields['ReasonCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Gets the value of the ReasonCode property. - * - * @return string ReasonCode","public function withReasonCode($value) - { - $this->setReasonCode($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Sets the value of the ReasonCode property. - * - * @param string $value ReasonCode - * - * @return this instance","public function isSetReasonCode() - { - return !is_null($this->fields['ReasonCode']['FieldValue']); - }" -OffAmazonPaymentsNotifications_Model_Status,"* Sets the value of the ReasonCode and returns this instance - * - * @param string $value ReasonCode - * - * @return OffAmazonPaymentsNotifications_Model_Status instance","public function getReasonDescription() - { - return $this->fields['ReasonDescription']['FieldValue']; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Checks if ReasonCode is set - * - * @return bool true if ReasonCode is set","public function setReasonDescription($value) - { - $this->fields['ReasonDescription']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Gets the value of the ReasonDescription property. - * - * @return string ReasonDescription","public function withReasonDescription($value) - { - $this->setReasonDescription($value); - return $this; - }" -OffAmazonPaymentsNotifications_Model_Status,"* Sets the value of the ReasonDescription property. - * - * @param string $value ReasonDescription - * - * @return this instance","public function isSetReasonDescription() - { - return !is_null($this->fields['ReasonDescription']['FieldValue']); - }" -AddressConsentSampleResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($queryString) - { - parent::__construct($queryString); - - $this->exampleClass = new AddressConsentSample( - new OffAmazonPaymentsService_Client(), - $this->queryStringParams['orderReferenceId'] - ); - }" -AddressConsentSampleResult,"* This script shows the difference between the the getOrderReferenceDetails call with - * and without an LwA access token for a DRAFT Order Reference object - * - * Note that this sample is currently applicable only for US customers of - * Pay with Amazon - *","public function run() - { - echo 'Address consent result'; - $noConsentResponse = $this->_getOrderReferenceDetailsWithoutAddressConsent(); - $this->_validateOrderReferenceIsInACorrectState($noConsentResponse); - - $consentResponse = $this->_getOrderReferenceDetailsWithAddressConsent(); - - $this->_printOrderReferenceResponses($noConsentResponse, $consentResponse); - echo ''; - }" -OffAmazonPaymentsNotifications_Samples_AuthorizationNotificationSample,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - OffAmazonPaymentsNotifications_Model_AuthorizationNotification $notification - ) { - parent::__construct($notification); - }" -OffAmazonPaymentsNotifications_Samples_AuthorizationNotificationSample,"* Class for handling an authorization notification and print the - * contents to the log file - *","public function logNotificationContents() - { - $this->ipnLogFile->writeLine(""Authorization Notification @ "".date(""Y-m-d H:i:s"") . "" (GMT)""); - $this->ipnLogFile->writeLine(""=============================================================================""); - if ($this->notification->isSetAuthorizationDetails()) { - $this->ipnLogFile->writeLine("" AuthorizeDetails""); - $authorizationDetails = $this->notification->getAuthorizationDetails(); - if ($authorizationDetails->isSetAmazonAuthorizationId()) { - $this->ipnLogFile->writeLine("" AmazonAuthorizationId""); - $this->ipnLogFile->writeLine("" "" . $authorizationDetails->getAmazonAuthorizationId()); - }" -AutomaticPaymentsSimpleCheckoutResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($queryString) - { - parent::__construct($queryString); - - $this->exampleClass = new AutomaticPaymentsSimpleCheckoutExample( - new OffAmazonPaymentsService_Client(), - $this->queryStringParams['billingAgreementId']); - }" -AutomaticPaymentsSimpleCheckoutResult,"* This script simulates a simple checkout example for automatic payment - * and generates html for the page - *","public function run () - { - // Calculate payment amount based on buyer selected shipping address - $paymentTotal = $this->_calculatePaymentAmountBasedOnBuyerDestinationAddress(); - - // Added custom information and seller note to the billing agreement - $this->_addSellerInformationToBillingAgreement(); - - /* - * Confirm billing agreement. The billing agreement has to be consented - * by buyer before you confirm the billing agreement. - */ - $this->_confirmBillingAgreement(); - - // Validate billing agreement (optional) - $this->_validateBillingAgreement(); - - // First payment - $amazonAuthorizationId1 = $this->_authorizePaymentAmount($paymentTotal, - $this->queryStringParams['billingAgreementId'] . ""-A01""); - $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId1); - $this->_capturePaymentAmount($paymentTotal, $amazonAuthorizationId1); - - // Second payment with capture now - $this->_authorizePaymentAmountWithCaptureNow($paymentTotal, - $this->queryStringParams['billingAgreementId'] . ""-A02""); - - // Third payment with capture now - $this->_authorizePaymentAmountWithCaptureNow($paymentTotal, - $this->queryStringParams['billingAgreementId'] . ""-A03""); - - // Close the billing agreement when this automatic payment is no longer - // needed - $this->_closeBillingAgreement(); - - print HTML_LB . HTML_LB . ""Automatic payment simple checkout sample is complete""; - }" -OffAmazonPaymentsNotifications_Samples_BillingAgreementNotificationSample,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ( - OffAmazonPaymentsNotifications_Model_BillingAgreementNotification $notification) - { - parent::__construct($notification); - }" -CancellationResult,"* ***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($queryString) - { - parent::__construct($queryString); - - $this->exampleClass = new CancellationExample( - new OffAmazonPaymentsService_Client(), - $this->queryStringParams['orderReferenceId'], - ""100.00"", - $this->currencyCode - ); - }" -CancellationResult,"* This script simulates a simple checkout example and generates - * html for the page - *","public function run() - { - $this->_setupOrderReference(); - $this->_confirmOrderReference(); - $amazonAuthorizationId = $this->_performAuthorization(); - $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId); - $this->_cancelOrder(); - $this->_getOrderReferenceDetails(); - print HTML_LB.HTML_LB.""Cancellation Sample is Complete""; - }" -OffAmazonPaymentsNotifications_Samples_CaptureNotificationSample,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - OffAmazonPaymentsNotifications_Model_CaptureNotification $notification - ) { - parent::__construct($notification); - }" -OffAmazonPaymentsNotifications_Samples_IpnLogFile,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($fileName) - { - $this->_fileName = $fileName; - $this->_fileHandler = fopen(LOG_FILE_LOCATION . $this->getFileName(), 'a'); - }" -OffAmazonPaymentsNotifications_Samples_IpnLogFile,"* Wrapper around a log file used to capture the ipn notifications - *","public function getFileName() - { - return $this->_fileName; - }" -OffAmazonPaymentsNotifications_Samples_IpnLogFile,"* Name of the log file without directory path - * - * @var string","public function writeLine($content) - { - fwrite($this->_fileHandler, $content . PHP_EOL); - }" -OffAmazonPaymentsNotifications_Samples_IpnLogFile,"* File handle - * - * @var int id","public function closeFile() - { - fclose($this->_fileHandler); - }" -for,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($notification) - { - if (!isset($notification)) { - throw new InvalidArgumentException(""notification is NULL""); - }" -for,"* Abstract parent class for handling an notification and print the - * contents to the log file - *","public function logNotification() - { - try { - $this->logNotificationContents(); - $this->ipnLogFile->writeLine(""=============================================================================""); - $this->ipnLogFile->closeFile(); - }" -OffAmazonPaymentsNotifications_Samples_OrderReferenceSample,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - OffAmazonPaymentsNotifications_Model_OrderReferenceNotification $notification - ) { - parent::__construct($notification); - }" -OffAmazonPaymentsNotifications_Samples_RefundNotificationSample,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - OffAmazonPaymentsNotifications_Model_RefundNotification $notification - ) { - parent::__construct($notification); - }" -RefundResult,"* ***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($queryString) - { - parent::__construct($queryString); - - $this->exampleClass = new RefundExample( - new OffAmazonPaymentsService_Client(), - $this->queryStringParams['orderReferenceId'], - $this->queryStringParams['amazonCaptureId'], - $this->queryStringParams['refundReferenceSuffix'] - ); - }" -RefundResult,"* This script simulates a simple checkout example and generates - * html for the page - *","public function run() - { - $this->_getOrderReferenceDetails(); - $amazonRefundId = $this->_refundToBuyer( - $this->queryStringParams[""refundAmount""], - $this->currencyCode - ); - $this->_waitUntilRefundProcessingIsCompleted($amazonRefundId); - $this->_getCaptureDetails(); - print HTML_LB.HTML_LB.""Refund Sample is Complete""; - }" -SimpleCheckoutResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($queryString) - { - parent::__construct($queryString); - - $this->exampleClass = new SimpleCheckoutExample( - new OffAmazonPaymentsService_Client(), - $this->queryStringParams['orderReferenceId'] - ); - }" -SimpleCheckoutResult,"* This script simulates a simple checkout example and generates - * html for the page - *","public function run() - { - $orderTotal = $this->_calculateOrderTotalBasedOnBuyerDestinationAddress(); - $this->_addOrderTotalAndSellerInformationToOrder($orderTotal); - $this->_confirmOrderReference(); - $amazonAuthorizationId = $this->_authorizeOrderAmount($orderTotal); - $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId); - $this->_getAdditionalInformationForProcessedAuthorization($amazonAuthorizationId); - $this->_captureOrderAmount($orderTotal, $amazonAuthorizationId); - $this->_closeOrderReference(); - print HTML_LB.HTML_LB.""Simple Checkout Sample is Complete""; - }" -SplitShipmentsCheckoutResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($queryString) - { - parent::__construct($queryString); - - $this->exampleClass = new SplitShipmentsCheckoutExample( - new OffAmazonPaymentsService_Client(), - $this->queryStringParams['orderReferenceId'] - ); - }" -SplitShipmentsCheckoutResult,"* This script simulates a split shipments checkout example and generates - * html for the page - *","public function run() - { - $this->_addShipmentsToOrder(); - $this->_addOrderAmountToOrderReference($this->currencyCode); - $this->_confirmOrderReference(); - $this->_performAuthAndCaptureForOrderShipments(); - $this->_closeOrderReference(); - print HTML_LB.HTML_LB.""Split Shipment Checkout Sample is Complete""; - }" -for,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($queryString) - { - parse_str($queryString, $this->queryStringParams); - $this->folderPath = LOG_FILE_LOCATION; - }" -OffAmazonPaymentsService_Client,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($config = null) - { - iconv_set_encoding('output_encoding', 'UTF-8'); - iconv_set_encoding('input_encoding', 'UTF-8'); - iconv_set_encoding('internal_encoding', 'UTF-8'); - - if ($config != null) { - $this->_checkConfigHasAllRequiredKeys($config); - $this->_merchantValues = new OffAmazonPaymentsService_MerchantValues( - $config['merchantId'], - $config['accessKey'], - $config['secretKey'], - $config['applicationName'], - $config['applicationVersion'], - $config['region'], - $config['environment'], - $config['serviceURL'], - $config['widgetURL'], - $config['caBundleFile'], - $config['clientId'] - ); - }" -OffAmazonPaymentsService_Client,* @see OffAmazonPaymentsService_Interface,"public function getMerchantValues() - { - return $this->_merchantValues; - }" -OffAmazonPaymentsService_Client,"* Implementation of the OffAmazonPaymentsService interface - * that implements client calls to the web service API - * - * OffAmazonPaymentsService_Client is an implementation of OffAmazonPaymentsService - *","public function capture($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_CaptureRequest) { - $request = new OffAmazonPaymentsService_Model_CaptureRequest($request); - }" -OffAmazonPaymentsService_Client,@var array,"public function refund($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_RefundRequest) { - - $request = new OffAmazonPaymentsService_Model_RefundRequest($request); - }" -OffAmazonPaymentsService_Client,"* Construct new Client - * - * @param string $awsAccessKeyId AWS Access Key ID - * @param string $awsSecretAccessKey AWS Secret Access Key - * @param array $config configuration options. - * Valid configuration options are: - * ","public function closeAuthorization($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_CloseAuthorizationRequest) { - $request = new OffAmazonPaymentsService_Model_CloseAuthorizationRequest($request); - }" -OffAmazonPaymentsService_Client,"* Collapse multiple whitespace characters into a single ' ' character. - * @param $s - * @return string","public function getRefundDetails($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_GetRefundDetailsRequest) { - $request = new OffAmazonPaymentsService_Model_GetRefundDetailsRequest($request); - }" -OffAmazonPaymentsService_Client,"* Collapse multiple whitespace characters into a single ' ' and backslash escape '\', - * and '/' characters from a string. - * @param $s - * @return string","public function getCaptureDetails($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_GetCaptureDetailsRequest) { - $request = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest($request); - }" -OffAmazonPaymentsService_Client,"* Collapse multiple whitespace characters into a single ' ' and backslash escape '\', - * and '(' characters from a string. - * - * @param $s - * @return string","public function closeOrderReference($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_CloseOrderReferenceRequest) { - $request = new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest($request); - }" -OffAmazonPaymentsService_Client,"* Collapse multiple whitespace characters into a single ' ' and backslash escape '\', - * and '=' characters from a string. - * - * @param $s - * @return unknown_type","public function confirmOrderReference($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest) { - $request = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest($request); - }" -OffAmazonPaymentsService_Client,"* Collapse multiple whitespace characters into a single ' ' and backslash escape ';', '\', - * and ')' characters from a string. - * - * @param $s - * @return unknown_type","public function getOrderReferenceDetails($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest) { - $request = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest($request); - }" -OffAmazonPaymentsService_Client,"* Capture - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CaptureRequest request - * or OffAmazonPaymentsService_Model_CaptureRequest object itself - * @see OffAmazonPaymentsService_Model_Capture - * @return OffAmazonPaymentsService_Model_CaptureResponse OffAmazonPaymentsService_Model_CaptureResponse - * - * @throws OffAmazonPaymentsService_Exception","public function authorize($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_AuthorizeRequest) { - $request = new OffAmazonPaymentsService_Model_AuthorizeRequest($request); - }" -OffAmazonPaymentsService_Client,"* Refund - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_RefundRequest request - * or OffAmazonPaymentsService_Model_RefundRequest object itself - * @see OffAmazonPaymentsService_Model_Refund - * @return OffAmazonPaymentsService_Model_RefundResponse OffAmazonPaymentsService_Model_RefundResponse - * - * @throws OffAmazonPaymentsService_Exception","public function setOrderReferenceDetails($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest) { - $request = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest($request); - }" -OffAmazonPaymentsService_Client,"* Close Authorization - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseAuthorizationRequest request - * or OffAmazonPaymentsService_Model_CloseAuthorizationRequest object itself - * @see OffAmazonPaymentsService_Model_CloseAuthorization - * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse OffAmazonPaymentsService_Model_CloseAuthorizationResponse - * - * @throws OffAmazonPaymentsService_Exception","public function getAuthorizationDetails($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest) { - $request = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest($request); - }" -OffAmazonPaymentsService_Client,"* Get Refund Details - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetRefundDetailsRequest request - * or OffAmazonPaymentsService_Model_GetRefundDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_GetRefundDetails - * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse OffAmazonPaymentsService_Model_GetRefundDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception","public function cancelOrderReference($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_CancelOrderReferenceRequest) { - $request = new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest($request); - }" -OffAmazonPaymentsService_Client,"* Get Capture Details - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetCaptureDetailsRequest request - * or OffAmazonPaymentsService_Model_GetCaptureDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_GetCaptureDetails - * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse OffAmazonPaymentsService_Model_GetCaptureDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception","public function createOrderReferenceForId($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest) { - $request = new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest($request); - }" -OffAmazonPaymentsService_Client,"* Close Order Reference - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseOrderReferenceRequest request - * or OffAmazonPaymentsService_Model_CloseOrderReferenceRequest object itself - * @see OffAmazonPaymentsService_Model_CloseOrderReference - * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse OffAmazonPaymentsService_Model_CloseOrderReferenceResponse - * - * @throws OffAmazonPaymentsService_Exception","public function getBillingAgreementDetails($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest) { - $request = new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest($request); - }" -OffAmazonPaymentsService_Client,"* Confirm Order Reference - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest request - * or OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest object itself - * @see OffAmazonPaymentsService_Model_ConfirmOrderReference - * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse - * - * @throws OffAmazonPaymentsService_Exception","public function setBillingAgreementDetails($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest) { - $request = new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest($request); - }" -OffAmazonPaymentsService_Client,"* Get Order Reference Details - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest request - * or OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_GetOrderReferenceDetails - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception","public function confirmBillingAgreement($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest) { - $request = new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest($request); - }" -OffAmazonPaymentsService_Client,"* Authorize - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_AuthorizeRequest request - * or OffAmazonPaymentsService_Model_AuthorizeRequest object itself - * @see OffAmazonPaymentsService_Model_Authorize - * @return OffAmazonPaymentsService_Model_AuthorizeResponse OffAmazonPaymentsService_Model_AuthorizeResponse - * - * @throws OffAmazonPaymentsService_Exception","public function validateBillingAgreement($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest) { - $request = new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest($request); - }" -OffAmazonPaymentsService_Client,"* Set Order Reference Details - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest request - * or OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_SetOrderReferenceDetails - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception","public function authorizeOnBillingAgreement($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest) { - $request = new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest($request); - }" -OffAmazonPaymentsService_Client,"* Get Authorization Details - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest request - * or OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_GetAuthorizationDetails - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception","public function closeBillingAgreement($request) - { - if (!$request instanceof OffAmazonPaymentsService_Model_CloseBillingAgreementRequest) { - $request = new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest($request); - }" -OffAmazonPaymentsService_Exception,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct(array $errorInfo = array()) - { - $this->_message = $errorInfo[""Message""]; - parent::__construct($this->_message); - if (array_key_exists(""Exception"", $errorInfo)) { - $exception = $errorInfo[""Exception""]; - if ($exception instanceof OffAmazonPaymentsService_Exception) { - $this->_statusCode = $exception->getStatusCode(); - $this->_errorCode = $exception->getErrorCode(); - $this->_errorType = $exception->getErrorType(); - $this->_requestId = $exception->getRequestId(); - $this->_xml= $exception->getXML(); - $this->_responseHeaderMetadata = $exception->getResponseHeaderMetadata(); - }" -OffAmazonPaymentsService_Exception,"* Off Amazon Payments Service Exception provides details of errors - * returned by Off Amazon Payments Service service - *","public function getErrorCode(){ - return $this->_errorCode; - }" -OffAmazonPaymentsService_Exception,@var string,"public function getErrorType(){ - return $this->_errorType; - }" -OffAmazonPaymentsService_Exception,@var int,"public function getErrorMessage() { - return $this->_message; - }" -OffAmazonPaymentsService_Exception,@var string,"public function getStatusCode() { - return $this->_statusCode; - }" -OffAmazonPaymentsService_Exception,@var string,"public function getXML() { - return $this->_xml; - }" -OffAmazonPaymentsService_Exception,@var string,"public function getRequestId() { - return $this->_requestId; - }" -OffAmazonPaymentsService_Exception,@var string,"public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -,"***************************************************************************** - * Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function capture($request); - - - - /** - * Refund - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_RefundRequest request - * or OffAmazonPaymentsService_Model_RefundRequest object itself - * @see OffAmazonPaymentsService_Model_RefundRequest - * @return OffAmazonPaymentsService_Model_RefundResponse OffAmazonPaymentsService_Model_RefundResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function refund($request); - - - - /** - * Close Authorization - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseAuthorizationRequest request - * or OffAmazonPaymentsService_Model_CloseAuthorizationRequest object itself - * @see OffAmazonPaymentsService_Model_CloseAuthorizationRequest - * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse OffAmazonPaymentsService_Model_CloseAuthorizationResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function closeAuthorization($request); - - - - /** - * Get Refund Details - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetRefundDetailsRequest request - * or OffAmazonPaymentsService_Model_GetRefundDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_GetRefundDetailsRequest - * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse OffAmazonPaymentsService_Model_GetRefundDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function getRefundDetails($request); - - - - /** - * Get Capture Details - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetCaptureDetailsRequest request - * or OffAmazonPaymentsService_Model_GetCaptureDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_GetCaptureDetailsRequest - * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse OffAmazonPaymentsService_Model_GetCaptureDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function getCaptureDetails($request); - - - - /** - * Close Order Reference - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseOrderReferenceRequest request - * or OffAmazonPaymentsService_Model_CloseOrderReferenceRequest object itself - * @see OffAmazonPaymentsService_Model_CloseOrderReferenceRequest - * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse OffAmazonPaymentsService_Model_CloseOrderReferenceResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function closeOrderReference($request); - - - - /** - * Confirm Order Reference - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest request - * or OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest object itself - * @see OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest - * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function confirmOrderReference($request); - - - - /** - * Get Order Reference Details - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest request - * or OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function getOrderReferenceDetails($request); - - - - /** - * Authorize - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_AuthorizeRequest request - * or OffAmazonPaymentsService_Model_AuthorizeRequest object itself - * @see OffAmazonPaymentsService_Model_AuthorizeRequest - * @return OffAmazonPaymentsService_Model_AuthorizeResponse OffAmazonPaymentsService_Model_AuthorizeResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function authorize($request); - - - - /** - * Set Order Reference Details - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest request - * or OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function setOrderReferenceDetails($request); - - - - /** - * Get Authorization Details - - * @see http://docs.amazonwebservices.com/${docPath}" -,"* Coral service for marketplace - * payment API operations for external - * merchants. - *","public function getAuthorizationDetails($request); - - - - /** - * Cancel Order Reference - - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CancelOrderReferenceRequest request - * or OffAmazonPaymentsService_Model_CancelOrderReferenceRequest object itself - * @see OffAmazonPaymentsService_Model_CancelOrderReferenceRequest - * @return OffAmazonPaymentsService_Model_CancelOrderReferenceResponse OffAmazonPaymentsService_Model_CancelOrderReferenceResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function cancelOrderReference($request); - - - - /** - * Create Order Reference For Id - * - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest request - * or OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest object itself - * @see OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest - * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function createOrderReferenceForId($request); - - - - /** - * Get Billing Agreement Details - * - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest request - * or OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest - * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function getBillingAgreementDetails($request); - - - - /** - * Set Billing Agreement Details - * - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest request - * or OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest object itself - * @see OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest - * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function setBillingAgreementDetails($request); - - - - /** - * Confirm Billing Agreement - * - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest request - * or OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest object itself - * @see OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest - * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function confirmBillingAgreement($request); - - - - /** - * Validate Billing Agreement - * - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest request - * or OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest object itself - * @see OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest - * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function validateBillingAgreement($request); - - - - /** - * Authorize On Billing Agreement - * - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest request - * or OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest object itself - * @see OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function authorizeOnBillingAgreement($request); - - - - /** - * Close Billing Agreement - * - * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseBillingAgreementRequest request - * or OffAmazonPaymentsService_Model_CloseBillingAgreementRequest object itself - * @see OffAmazonPaymentsService_Model_CloseBillingAgreementRequest - * @return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse OffAmazonPaymentsService_Model_CloseBillingAgreementResponse - * - * @throws OffAmazonPaymentsService_Exception - */ - public function closeBillingAgreement($request); - -}" -OffAmazonPaymentsService_MerchantValues,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct( - $merchantId, - $accessKey, - $secretKey, - $applicationName, - $applicationVersion, - $region, - $environment, - $serviceUrl, - $widgetUrl, - $caBundleFile, - $clientId - ) { - $this->_merchantId = $merchantId; - $this->_accessKey = $accessKey; - $this->_secretKey = $secretKey; - $this->_applicationName = $applicationName; - $this->_applicationVersion = $applicationVersion; - $this->_region = strtoupper($region); - $this->_environment = strtoupper($environment); - $this->_caBundleFile = $caBundleFile; - $this->_serviceUrl = $serviceUrl; - $this->_widgetUrl = $widgetUrl; - $this->_regionSpecificProperties = new OffAmazonPaymentsService_RegionSpecificProperties(); - $this->_clientId = $clientId; - - if ($this->_merchantId == """") { - throw new InvalidArgumentException(""merchantId not set in the properties file""); - }" -for,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - if (!is_null($data)) { - if ($this->_isAssociativeArray($data)) { - $this->_fromAssociativeArray($data); - }" -for,* OffAmazonPaymentsService_Model - base class for all model classes,"public function __get($propertyName) - { - $getter = ""get$propertyName""; - return $this->$getter(); - }" -for,@var array,"public function __set($propertyName, $propertyValue) - { - $setter = ""set$propertyName""; - $this->$setter($propertyValue); - return $this; - }" -OffAmazonPaymentsService_RegionSpecificProperties,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function getWidgetUrlFor($region, $environment, $merchantId, $overrideUrl) - { - return sprintf(self::WIDGET_FORMAT_STRING, - $this->_getWidgetHostFor($region, $overrideUrl), - $this->_getWidgetRegionFor($region), - $this->_getWidgetEnvironmentFor($environment), - urlencode($merchantId)); - }" -OffAmazonPaymentsService_RegionSpecificProperties,"* Encapsulation of properties that are tied to a region/environment pairing - * - * Provides mappings for: - * - widget url - * - mws service url - * - currency code","public function getServiceUrlFor($region, $environment, $overrideUrl) - { - return sprintf(self::SERVICE_FORMAT_STRING, - $this->_getServiceHostFor($region, $overrideUrl), - $this->_getSectionNameFor($environment), - OffAmazonPaymentsService_Client::SERVICE_VERSION); - }" -OffAmazonPaymentsService_RegionSpecificProperties,"* Return the correct widget url for the javascript widget - * - * @param string $region - * @param string $environment - * @param string $merchantId - * @param string $overrideUrl - * - * @return string widgetUrl","public function getCurrencyFor($region) - { - $this->_validateRegionIsDefined($region, $this->_currencyCodes); - return $this->_currencyCodes[$region]; - }" -OffAmazonPaymentsService_Model_Address,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'Name' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AddressLine1' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AddressLine2' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AddressLine3' => array('FieldValue' => null, 'FieldType' => 'string'), - 'City' => array('FieldValue' => null, 'FieldType' => 'string'), - 'County' => array('FieldValue' => null, 'FieldType' => 'string'), - 'District' => array('FieldValue' => null, 'FieldType' => 'string'), - 'StateOrRegion' => array('FieldValue' => null, 'FieldType' => 'string'), - 'PostalCode' => array('FieldValue' => null, 'FieldType' => 'string'), - 'CountryCode' => array('FieldValue' => null, 'FieldType' => 'string'), - 'Phone' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_Address,* @see OffAmazonPaymentsService_Model,"public function getName() - { - return $this->_fields['Name']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* OffAmazonPaymentsService_Model_Address - * - * Properties: - * ","public function setName($value) - { - $this->_fields['Name']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Construct new OffAmazonPaymentsService_Model_Address - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withName($value) - { - $this->setName($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the Name property. - * - * @return string Name","public function isSetName() - { - return !is_null($this->_fields['Name']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the Name property. - * - * @param string Name - * @return this instance","public function getAddressLine1() - { - return $this->_fields['AddressLine1']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the Name and returns this instance - * - * @param string $value Name - * @return OffAmazonPaymentsService_Model_Address instance","public function setAddressLine1($value) - { - $this->_fields['AddressLine1']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if Name is set - * - * @return bool true if Name is set","public function withAddressLine1($value) - { - $this->setAddressLine1($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the AddressLine1 property. - * - * @return string AddressLine1","public function isSetAddressLine1() - { - return !is_null($this->_fields['AddressLine1']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the AddressLine1 property. - * - * @param string AddressLine1 - * @return this instance","public function getAddressLine2() - { - return $this->_fields['AddressLine2']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the AddressLine1 and returns this instance - * - * @param string $value AddressLine1 - * @return OffAmazonPaymentsService_Model_Address instance","public function setAddressLine2($value) - { - $this->_fields['AddressLine2']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if AddressLine1 is set - * - * @return bool true if AddressLine1 is set","public function withAddressLine2($value) - { - $this->setAddressLine2($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the AddressLine2 property. - * - * @return string AddressLine2","public function isSetAddressLine2() - { - return !is_null($this->_fields['AddressLine2']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the AddressLine2 property. - * - * @param string AddressLine2 - * @return this instance","public function getAddressLine3() - { - return $this->_fields['AddressLine3']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the AddressLine2 and returns this instance - * - * @param string $value AddressLine2 - * @return OffAmazonPaymentsService_Model_Address instance","public function setAddressLine3($value) - { - $this->_fields['AddressLine3']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if AddressLine2 is set - * - * @return bool true if AddressLine2 is set","public function withAddressLine3($value) - { - $this->setAddressLine3($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the AddressLine3 property. - * - * @return string AddressLine3","public function isSetAddressLine3() - { - return !is_null($this->_fields['AddressLine3']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the AddressLine3 property. - * - * @param string AddressLine3 - * @return this instance","public function getCity() - { - return $this->_fields['City']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the AddressLine3 and returns this instance - * - * @param string $value AddressLine3 - * @return OffAmazonPaymentsService_Model_Address instance","public function setCity($value) - { - $this->_fields['City']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if AddressLine3 is set - * - * @return bool true if AddressLine3 is set","public function withCity($value) - { - $this->setCity($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the City property. - * - * @return string City","public function isSetCity() - { - return !is_null($this->_fields['City']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the City property. - * - * @param string City - * @return this instance","public function getCounty() - { - return $this->_fields['County']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the City and returns this instance - * - * @param string $value City - * @return OffAmazonPaymentsService_Model_Address instance","public function setCounty($value) - { - $this->_fields['County']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if City is set - * - * @return bool true if City is set","public function withCounty($value) - { - $this->setCounty($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the County property. - * - * @return string County","public function isSetCounty() - { - return !is_null($this->_fields['County']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the County property. - * - * @param string County - * @return this instance","public function getDistrict() - { - return $this->_fields['District']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the County and returns this instance - * - * @param string $value County - * @return OffAmazonPaymentsService_Model_Address instance","public function setDistrict($value) - { - $this->_fields['District']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if County is set - * - * @return bool true if County is set","public function withDistrict($value) - { - $this->setDistrict($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the District property. - * - * @return string District","public function isSetDistrict() - { - return !is_null($this->_fields['District']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the District property. - * - * @param string District - * @return this instance","public function getStateOrRegion() - { - return $this->_fields['StateOrRegion']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the District and returns this instance - * - * @param string $value District - * @return OffAmazonPaymentsService_Model_Address instance","public function setStateOrRegion($value) - { - $this->_fields['StateOrRegion']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if District is set - * - * @return bool true if District is set","public function withStateOrRegion($value) - { - $this->setStateOrRegion($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the StateOrRegion property. - * - * @return string StateOrRegion","public function isSetStateOrRegion() - { - return !is_null($this->_fields['StateOrRegion']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the StateOrRegion property. - * - * @param string StateOrRegion - * @return this instance","public function getPostalCode() - { - return $this->_fields['PostalCode']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the StateOrRegion and returns this instance - * - * @param string $value StateOrRegion - * @return OffAmazonPaymentsService_Model_Address instance","public function setPostalCode($value) - { - $this->_fields['PostalCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if StateOrRegion is set - * - * @return bool true if StateOrRegion is set","public function withPostalCode($value) - { - $this->setPostalCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the PostalCode property. - * - * @return string PostalCode","public function isSetPostalCode() - { - return !is_null($this->_fields['PostalCode']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the PostalCode property. - * - * @param string PostalCode - * @return this instance","public function getCountryCode() - { - return $this->_fields['CountryCode']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the PostalCode and returns this instance - * - * @param string $value PostalCode - * @return OffAmazonPaymentsService_Model_Address instance","public function setCountryCode($value) - { - $this->_fields['CountryCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if PostalCode is set - * - * @return bool true if PostalCode is set","public function withCountryCode($value) - { - $this->setCountryCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the CountryCode property. - * - * @return string CountryCode","public function isSetCountryCode() - { - return !is_null($this->_fields['CountryCode']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the CountryCode property. - * - * @param string CountryCode - * @return this instance","public function getPhone() - { - return $this->_fields['Phone']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Address,"* Sets the value of the CountryCode and returns this instance - * - * @param string $value CountryCode - * @return OffAmazonPaymentsService_Model_Address instance","public function setPhone($value) - { - $this->_fields['Phone']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Checks if CountryCode is set - * - * @return bool true if CountryCode is set","public function withPhone($value) - { - $this->setPhone($value); - return $this; - }" -OffAmazonPaymentsService_Model_Address,"* Gets the value of the Phone property. - * - * @return string Phone","public function isSetPhone() - { - return !is_null($this->_fields['Phone']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'AmazonAuthorizationId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AuthorizationReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AuthorizationBillingAddress' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Address'), - 'SellerAuthorizationNote' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'AuthorizationAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - - 'CapturedAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - - 'AuthorizationFee' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - - 'IdList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_IdList'), - - 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ExpirationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'AuthorizationStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'), - - - 'OrderItemCategories' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderItemCategories'), - - 'CaptureNow' => array('FieldValue' => null, 'FieldType' => 'bool'), - 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,* @see OffAmazonPaymentsService_Model,"public function getAmazonAuthorizationId() - { - return $this->_fields['AmazonAuthorizationId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* OffAmazonPaymentsService_Model_AuthorizationDetails - * - * Properties: - * ","public function setAmazonAuthorizationId($value) - { - $this->_fields['AmazonAuthorizationId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Construct new OffAmazonPaymentsService_Model_AuthorizationDetails - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAmazonAuthorizationId($value) - { - $this->setAmazonAuthorizationId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the AmazonAuthorizationId property. - * - * @return string AmazonAuthorizationId","public function isSetAmazonAuthorizationId() - { - return !is_null($this->_fields['AmazonAuthorizationId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AmazonAuthorizationId property. - * - * @param string AmazonAuthorizationId - * @return this instance","public function getAuthorizationReferenceId() - { - return $this->_fields['AuthorizationReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AmazonAuthorizationId and returns this instance - * - * @param string $value AmazonAuthorizationId - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setAuthorizationReferenceId($value) - { - $this->_fields['AuthorizationReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if AmazonAuthorizationId is set - * - * @return bool true if AmazonAuthorizationId is set","public function withAuthorizationReferenceId($value) - { - $this->setAuthorizationReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the AuthorizationReferenceId property. - * - * @return string AuthorizationReferenceId","public function isSetAuthorizationReferenceId() - { - return !is_null($this->_fields['AuthorizationReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationReferenceId property. - * - * @param string AuthorizationReferenceId - * @return this instance","public function getAuthorizationBillingAddress() - { - return $this->_fields['AuthorizationBillingAddress']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationReferenceId and returns this instance - * - * @param string $value AuthorizationReferenceId - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setAuthorizationBillingAddress($value) - { - $this->_fields['AuthorizationBillingAddress']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if AuthorizationReferenceId is set - * - * @return bool true if AuthorizationReferenceId is set","public function withAuthorizationBillingAddress($value) - { - $this->setAuthorizationBillingAddress($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the AuthorizationBillingAddress property. - * - * @return string AuthorizationBillingAddress","public function isSetAuthorizationBillingAddress() - { - return !is_null($this->_fields['AuthorizationBillingAddress']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationBillingAddress property. - * - * @param string AuthorizationBillingAddress - * @return this instance","public function getSellerAuthorizationNote() - { - return $this->_fields['SellerAuthorizationNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationBillingAddress and returns this instance - * - * @param string $value AuthorizationBillingAddress - * @return OffAmazonPaymentsService_Model_Address instance","public function setSellerAuthorizationNote($value) - { - $this->_fields['SellerAuthorizationNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if AuthorizationBillingAddress is set - * - * @return bool true if AuthorizationBillingAddress is set","public function withSellerAuthorizationNote($value) - { - $this->setSellerAuthorizationNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the SellerAuthorizationNote property. - * - * @return string SellerAuthorizationNote","public function isSetSellerAuthorizationNote() - { - return !is_null($this->_fields['SellerAuthorizationNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the SellerAuthorizationNote property. - * - * @param string SellerAuthorizationNote - * @return this instance","public function getAuthorizationAmount() - { - return $this->_fields['AuthorizationAmount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the SellerAuthorizationNote and returns this instance - * - * @param string $value SellerAuthorizationNote - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setAuthorizationAmount($value) - { - $this->_fields['AuthorizationAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if SellerAuthorizationNote is set - * - * @return bool true if SellerAuthorizationNote is set","public function withAuthorizationAmount($value) - { - $this->setAuthorizationAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the AuthorizationAmount. - * - * @return OffAmazonPaymentsService_Model_Price AuthorizationAmount","public function isSetAuthorizationAmount() - { - return !is_null($this->_fields['AuthorizationAmount']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationAmount. - * - * @param Price AuthorizationAmount - * @return void","public function getCapturedAmount() - { - return $this->_fields['CapturedAmount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationAmount and returns this instance - * - * @param Price $value AuthorizationAmount - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setCapturedAmount($value) - { - $this->_fields['CapturedAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if AuthorizationAmount is set - * - * @return bool true if AuthorizationAmount property is set","public function withCapturedAmount($value) - { - $this->setCapturedAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the CapturedAmount. - * - * @return Price CapturedAmount","public function isSetCapturedAmount() - { - return !is_null($this->_fields['CapturedAmount']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the CapturedAmount. - * - * @param Price CapturedAmount - * @return void","public function getAuthorizationFee() - { - return $this->_fields['AuthorizationFee']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the CapturedAmount and returns this instance - * - * @param Price $value CapturedAmount - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setAuthorizationFee($value) - { - $this->_fields['AuthorizationFee']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if CapturedAmount is set - * - * @return bool true if CapturedAmount property is set","public function withAuthorizationFee($value) - { - $this->setAuthorizationFee($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the AuthorizationFee. - * - * @return Price AuthorizationFee","public function isSetAuthorizationFee() - { - return !is_null($this->_fields['AuthorizationFee']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationFee. - * - * @param Price AuthorizationFee - * @return void","public function getIdList() - { - return $this->_fields['IdList']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationFee and returns this instance - * - * @param Price $value AuthorizationFee - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setIdList($value) - { - $this->_fields['IdList']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if AuthorizationFee is set - * - * @return bool true if AuthorizationFee property is set","public function withIdList($value) - { - $this->setIdList($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the IdList. - * - * @return OffAmazonPaymentsService_Model_IdList IdList","public function isSetIdList() - { - return !is_null($this->_fields['IdList']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the IdList. - * - * @param IdList IdList - * @return void","public function getCreationTimestamp() - { - return $this->_fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the IdList and returns this instance - * - * @param IdList $value IdList - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setCreationTimestamp($value) - { - $this->_fields['CreationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if IdList is set - * - * @return bool true if IdList property is set","public function withCreationTimestamp($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the CreationTimestamp property. - * - * @return string CreationTimestamp","public function isSetCreationTimestamp() - { - return !is_null($this->_fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the CreationTimestamp property. - * - * @param string CreationTimestamp - * @return this instance","public function getExpirationTimestamp() - { - return $this->_fields['ExpirationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the CreationTimestamp and returns this instance - * - * @param string $value CreationTimestamp - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setExpirationTimestamp($value) - { - $this->_fields['ExpirationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp is set","public function withExpirationTimestamp($value) - { - $this->setExpirationTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the ExpirationTimestamp property. - * - * @return string ExpirationTimestamp","public function isSetExpirationTimestamp() - { - return !is_null($this->_fields['ExpirationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the ExpirationTimestamp property. - * - * @param string ExpirationTimestamp - * @return this instance","public function getAuthorizationStatus() - { - return $this->_fields['AuthorizationStatus']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the ExpirationTimestamp and returns this instance - * - * @param string $value ExpirationTimestamp - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setAuthorizationStatus($value) - { - $this->_fields['AuthorizationStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if ExpirationTimestamp is set - * - * @return bool true if ExpirationTimestamp is set","public function withAuthorizationStatus($value) - { - $this->setAuthorizationStatus($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the AuthorizationStatus. - * - * @return OffAmazonPaymentsService_Model_Status AuthorizationStatus","public function isSetAuthorizationStatus() - { - return !is_null($this->_fields['AuthorizationStatus']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationStatus. - * - * @param Status AuthorizationStatus - * @return void","public function getOrderItemCategories() - { - return $this->_fields['OrderItemCategories']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the AuthorizationStatus and returns this instance - * - * @param Status $value AuthorizationStatus - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setOrderItemCategories($value) - { - $this->_fields['OrderItemCategories']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if AuthorizationStatus is set - * - * @return bool true if AuthorizationStatus property is set","public function withOrderItemCategories($value) - { - $this->setOrderItemCategories($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the OrderItemCategories. - * - * @return OrderItemCategories OrderItemCategories","public function isSetOrderItemCategories() - { - return !is_null($this->_fields['OrderItemCategories']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the OrderItemCategories. - * - * @param OrderItemCategories OrderItemCategories - * @return void","public function getCaptureNow() - { - return $this->_fields['CaptureNow']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the OrderItemCategories and returns this instance - * - * @param OrderItemCategories $value OrderItemCategories - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setCaptureNow($value) - { - $this->_fields['CaptureNow']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if OrderItemCategories is set - * - * @return bool true if OrderItemCategories property is set","public function withCaptureNow($value) - { - $this->setCaptureNow($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the CaptureNow property. - * - * @return bool CaptureNow","public function isSetCaptureNow() - { - return !is_null($this->_fields['CaptureNow']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the CaptureNow property. - * - * @param bool CaptureNow - * @return this instance","public function getSoftDescriptor() - { - return $this->_fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Sets the value of the CaptureNow and returns this instance - * - * @param bool $value CaptureNow - * @return OffAmazonPaymentsService_Model_AuthorizationDetails instance","public function setSoftDescriptor($value) - { - $this->_fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Checks if CaptureNow is set - * - * @return bool true if CaptureNow is set","public function withSoftDescriptor($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizationDetails,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function isSetSoftDescriptor() - { - return !is_null($this->_fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'SellerId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'AmazonBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'AuthorizationReferenceId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'AuthorizationAmount' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_Price' - ), - - 'SellerAuthorizationNote' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'TransactionTimeout' => array( - 'FieldValue' => null, - 'FieldType' => 'int' - ), - 'CaptureNow' => array( - 'FieldValue' => null, - 'FieldType' => 'bool' - ), - 'SoftDescriptor' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'SellerNote' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'PlatformId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'SellerOrderAttributes' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_SellerOrderAttributes' - ), - - 'InheritShippingAddress' => array( - 'FieldValue' => null, - 'FieldType' => 'bool' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest - * - * Properties: - * ","public function getSellerId () - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Construct new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setSellerId ($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function withSellerId ($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function isSetSellerId () - { - return ! is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getAmazonBillingAgreementId () - { - return $this->_fields['AmazonBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function setAmazonBillingAgreementId ($value) - { - $this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the AmazonBillingAgreementId property. - * - * @return string AmazonBillingAgreementId","public function withAmazonBillingAgreementId ($value) - { - $this->setAmazonBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the AmazonBillingAgreementId property. - * - * @param string AmazonBillingAgreementId - * @return this instance","public function isSetAmazonBillingAgreementId () - { - return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the AmazonBillingAgreementId and returns this instance - * - * @param string $value AmazonBillingAgreementId - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getAuthorizationReferenceId () - { - return $this->_fields['AuthorizationReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if AmazonBillingAgreementId is set - * - * @return bool true if AmazonBillingAgreementId is set","public function setAuthorizationReferenceId ($value) - { - $this->_fields['AuthorizationReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the AuthorizationReferenceId property. - * - * @return string AuthorizationReferenceId","public function withAuthorizationReferenceId ($value) - { - $this->setAuthorizationReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the AuthorizationReferenceId property. - * - * @param string AuthorizationReferenceId - * @return this instance","public function isSetAuthorizationReferenceId () - { - return ! is_null($this->_fields['AuthorizationReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the AuthorizationReferenceId and returns this instance - * - * @param string $value AuthorizationReferenceId - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getAuthorizationAmount () - { - return $this->_fields['AuthorizationAmount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if AuthorizationReferenceId is set - * - * @return bool true if AuthorizationReferenceId is set","public function setAuthorizationAmount ($value) - { - $this->_fields['AuthorizationAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the AuthorizationAmount. - * - * @return Price AuthorizationAmount","public function withAuthorizationAmount ($value) - { - $this->setAuthorizationAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the AuthorizationAmount. - * - * @param Price AuthorizationAmount - * @return void","public function isSetAuthorizationAmount () - { - return ! is_null($this->_fields['AuthorizationAmount']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the AuthorizationAmount and returns this instance - * - * @param Price $value AuthorizationAmount - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getSellerAuthorizationNote () - { - return $this->_fields['SellerAuthorizationNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if AuthorizationAmount is set - * - * @return bool true if AuthorizationAmount property is set","public function setSellerAuthorizationNote ($value) - { - $this->_fields['SellerAuthorizationNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the SellerAuthorizationNote property. - * - * @return string SellerAuthorizationNote","public function withSellerAuthorizationNote ($value) - { - $this->setSellerAuthorizationNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SellerAuthorizationNote property. - * - * @param string SellerAuthorizationNote - * @return this instance","public function isSetSellerAuthorizationNote () - { - return ! is_null($this->_fields['SellerAuthorizationNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SellerAuthorizationNote and returns this instance - * - * @param string $value SellerAuthorizationNote - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getTransactionTimeout () - { - return $this->_fields['TransactionTimeout']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if SellerAuthorizationNote is set - * - * @return bool true if SellerAuthorizationNote is set","public function setTransactionTimeout ($value) - { - $this->_fields['TransactionTimeout']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the TransactionTimeout property. - * - * @return int TransactionTimeout","public function withTransactionTimeout ($value) - { - $this->setTransactionTimeout($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the TransactionTimeout property. - * - * @param int TransactionTimeout - * @return this instance","public function isSetTransactionTimeout () - { - return ! is_null($this->_fields['TransactionTimeout']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the TransactionTimeout and returns this instance - * - * @param int $value TransactionTimeout - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getCaptureNow () - { - return $this->_fields['CaptureNow']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if TransactionTimeout is set - * - * @return bool true if TransactionTimeout is set","public function setCaptureNow ($value) - { - $this->_fields['CaptureNow']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the CaptureNow property. - * - * @return bool CaptureNow","public function withCaptureNow ($value) - { - $this->setCaptureNow($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the CaptureNow property. - * - * @param bool CaptureNow - * @return this instance","public function isSetCaptureNow () - { - return ! is_null($this->_fields['CaptureNow']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the CaptureNow and returns this instance - * - * @param bool $value CaptureNow - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getSoftDescriptor () - { - return $this->_fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if CaptureNow is set - * - * @return bool true if CaptureNow is set","public function setSoftDescriptor ($value) - { - $this->_fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function withSoftDescriptor ($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SoftDescriptor property. - * - * @param string SoftDescriptor - * @return this instance","public function isSetSoftDescriptor () - { - return ! is_null($this->_fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SoftDescriptor and returns this instance - * - * @param string $value SoftDescriptor - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getSellerNote () - { - return $this->_fields['SellerNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if SoftDescriptor is set - * - * @return bool true if SoftDescriptor is set","public function setSellerNote ($value) - { - $this->_fields['SellerNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the SellerNote property. - * - * @return string SellerNote","public function withSellerNote ($value) - { - $this->setSellerNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SellerNote property. - * - * @param string SellerNote - * @return this instance","public function isSetSellerNote () - { - return ! is_null($this->_fields['SellerNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SellerNote and returns this instance - * - * @param string $value SellerNote - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getPlatformId () - { - return $this->_fields['PlatformId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if SellerNote is set - * - * @return bool true if SellerNote is set","public function setPlatformId ($value) - { - $this->_fields['PlatformId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the PlatformId property. - * - * @return string PlatformId","public function withPlatformId ($value) - { - $this->setPlatformId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the PlatformId property. - * - * @param string PlatformId - * @return this instance","public function isSetPlatformId () - { - return ! is_null($this->_fields['PlatformId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the PlatformId and returns this instance - * - * @param string $value PlatformId - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getSellerOrderAttributes () - { - return $this->_fields['SellerOrderAttributes']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if PlatformId is set - * - * @return bool true if PlatformId is set","public function setSellerOrderAttributes ($value) - { - $this->_fields['SellerOrderAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the SellerOrderAttributes. - * - * @return SellerOrderAttributes SellerOrderAttributes","public function withSellerOrderAttributes ($value) - { - $this->setSellerOrderAttributes($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SellerOrderAttributes. - * - * @param SellerOrderAttributes SellerOrderAttributes - * @return void","public function isSetSellerOrderAttributes () - { - return ! is_null($this->_fields['SellerOrderAttributes']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the SellerOrderAttributes and returns this instance - * - * @param SellerOrderAttributes $value SellerOrderAttributes - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest instance","public function getInheritShippingAddress () - { - return $this->_fields['InheritShippingAddress']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Checks if SellerOrderAttributes is set - * - * @return bool true if SellerOrderAttributes property is set","public function setInheritShippingAddress ($value) - { - $this->_fields['InheritShippingAddress']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Gets the value of the InheritShippingAddress property. - * - * @return bool InheritShippingAddress","public function withInheritShippingAddress ($value) - { - $this->setInheritShippingAddress($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest,"* Sets the value of the InheritShippingAddress property. - * - * @param bool InheritShippingAddress - * @return this instance","public function isSetInheritShippingAddress () - { - return ! is_null($this->_fields['InheritShippingAddress']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'AuthorizeOnBillingAgreementResult' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult' - ), - - 'ResponseMetadata' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse - * - * Properties: - * ","public function getAuthorizeOnBillingAgreementResult () - { - return $this->_fields['AuthorizeOnBillingAgreementResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Construct new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAuthorizeOnBillingAgreementResult ($value) - { - $this->_fields['AuthorizeOnBillingAgreementResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Construct OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse","public function withAuthorizeOnBillingAgreementResult ($value) - { - $this->setAuthorizeOnBillingAgreementResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Gets the value of the AuthorizeOnBillingAgreementResult. - * - * @return AuthorizeOnBillingAgreementResult AuthorizeOnBillingAgreementResult","public function isSetAuthorizeOnBillingAgreementResult () - { - return ! is_null($this->_fields['AuthorizeOnBillingAgreementResult']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Sets the value of the AuthorizeOnBillingAgreementResult. - * - * @param AuthorizeOnBillingAgreementResult AuthorizeOnBillingAgreementResult - * @return void","public function getResponseMetadata () - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Sets the value of the AuthorizeOnBillingAgreementResult and returns this instance - * - * @param AuthorizeOnBillingAgreementResult $value AuthorizeOnBillingAgreementResult - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse instance","public function setResponseMetadata ($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Checks if AuthorizeOnBillingAgreementResult is set - * - * @return bool true if AuthorizeOnBillingAgreementResult property is set","public function withResponseMetadata ($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function isSetResponseMetadata () - { - return ! is_null($this->_fields['ResponseMetadata']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function toXML () - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse instance","public function getResponseHeaderMetadata () - { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse,"* Checks if ResponseMetadata is set - * - * @return bool true if ResponseMetadata property is set","public function setResponseHeaderMetadata ($responseHeaderMetadata) - { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'AuthorizationDetails' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizationDetails' - ), - - 'AmazonOrderReferenceId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,"* OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult - * - * Properties: - * ","public function getAuthorizationDetails () - { - return $this->_fields['AuthorizationDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,"* Construct new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAuthorizationDetails ($value) - { - $this->_fields['AuthorizationDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,"* Gets the value of the AuthorizationDetails. - * - * @return AuthorizationDetails AuthorizationDetails","public function withAuthorizationDetails ($value) - { - $this->setAuthorizationDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,"* Sets the value of the AuthorizationDetails. - * - * @param AuthorizationDetails AuthorizationDetails - * @return void","public function isSetAuthorizationDetails () - { - return ! is_null($this->_fields['AuthorizationDetails']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,"* Sets the value of the AuthorizationDetails and returns this instance - * - * @param AuthorizationDetails $value AuthorizationDetails - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult instance","public function getAmazonOrderReferenceId () - { - return $this->_fields['AmazonOrderReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,"* Checks if AuthorizationDetails is set - * - * @return bool true if AuthorizationDetails property is set","public function setAmazonOrderReferenceId ($value) - { - $this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,"* Gets the value of the AmazonOrderReferenceId property. - * - * @return string AmazonOrderReferenceId","public function withAmazonOrderReferenceId ($value) - { - $this->setAmazonOrderReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResult,"* Sets the value of the AmazonOrderReferenceId property. - * - * @param string AmazonOrderReferenceId - * @return this instance","public function isSetAmazonOrderReferenceId () - { - return ! is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AuthorizationReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'AuthorizationAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - 'SellerAuthorizationNote' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'OrderItemCategories' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderItemCategories'), - - 'TransactionTimeout' => array('FieldValue' => null, 'FieldType' => 'int'), - 'CaptureNow' => array('FieldValue' => null, 'FieldType' => 'bool'), - 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* OffAmazonPaymentsService_Model_AuthorizeRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Construct new OffAmazonPaymentsService_Model_AuthorizeRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonOrderReferenceId() - { - return $this->_fields['AmazonOrderReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","public function setAmazonOrderReferenceId($value) - { - $this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonOrderReferenceId($value) - { - $this->setAmazonOrderReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Gets the value of the AmazonOrderReferenceId property. - * - * @return string AmazonOrderReferenceId","public function isSetAmazonOrderReferenceId() - { - return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the AmazonOrderReferenceId property. - * - * @param string AmazonOrderReferenceId - * @return this instance","public function getAuthorizationReferenceId() - { - return $this->_fields['AuthorizationReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the AmazonOrderReferenceId and returns this instance - * - * @param string $value AmazonOrderReferenceId - * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","public function setAuthorizationReferenceId($value) - { - $this->_fields['AuthorizationReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Checks if AmazonOrderReferenceId is set - * - * @return bool true if AmazonOrderReferenceId is set","public function withAuthorizationReferenceId($value) - { - $this->setAuthorizationReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Gets the value of the AuthorizationReferenceId property. - * - * @return string AuthorizationReferenceId","public function isSetAuthorizationReferenceId() - { - return !is_null($this->_fields['AuthorizationReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the AuthorizationReferenceId property. - * - * @param string AuthorizationReferenceId - * @return this instance","public function getAuthorizationAmount() - { - return $this->_fields['AuthorizationAmount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the AuthorizationReferenceId and returns this instance - * - * @param string $value AuthorizationReferenceId - * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","public function setAuthorizationAmount($value) - { - $this->_fields['AuthorizationAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Checks if AuthorizationReferenceId is set - * - * @return bool true if AuthorizationReferenceId is set","public function withAuthorizationAmount($value) - { - $this->setAuthorizationAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Gets the value of the AuthorizationAmount. - * - * @return \OffAmazonPaymentsService_Model_Price AuthorizationAmount","public function isSetAuthorizationAmount() - { - return !is_null($this->_fields['AuthorizationAmount']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the AuthorizationAmount. - * - * @param \OffAmazonPaymentsService_Model_Price AuthorizationAmount - * @return void","public function getSellerAuthorizationNote() - { - return $this->_fields['SellerAuthorizationNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the AuthorizationAmount and returns this instance - * - * @param \OffAmazonPaymentsService_Model_Price $value AuthorizationAmount - * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","public function setSellerAuthorizationNote($value) - { - $this->_fields['SellerAuthorizationNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Checks if AuthorizationAmount is set - * - * @return bool true if AuthorizationAmount property is set","public function withSellerAuthorizationNote($value) - { - $this->setSellerAuthorizationNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Gets the value of the SellerAuthorizationNote property. - * - * @return string SellerAuthorizationNote","public function isSetSellerAuthorizationNote() - { - return !is_null($this->_fields['SellerAuthorizationNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the SellerAuthorizationNote property. - * - * @param string SellerAuthorizationNote - * @return this instance","public function getOrderItemCategories() - { - return $this->_fields['OrderItemCategories']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the SellerAuthorizationNote and returns this instance - * - * @param string $value SellerAuthorizationNote - * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","public function setOrderItemCategories($value) - { - $this->_fields['OrderItemCategories']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Checks if SellerAuthorizationNote is set - * - * @return bool true if SellerAuthorizationNote is set","public function withOrderItemCategories($value) - { - $this->setOrderItemCategories($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Gets the value of the OrderItemCategories. - * - * @return OrderItemCategories OrderItemCategories","public function isSetOrderItemCategories() - { - return !is_null($this->_fields['OrderItemCategories']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the OrderItemCategories. - * - * @param OrderItemCategories OrderItemCategories - * @return void","public function getTransactionTimeout() - { - return $this->_fields['TransactionTimeout']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the OrderItemCategories and returns this instance - * - * @param OrderItemCategories $value OrderItemCategories - * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","public function setTransactionTimeout($value) - { - $this->_fields['TransactionTimeout']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Checks if OrderItemCategories is set - * - * @return bool true if OrderItemCategories property is set","public function withTransactionTimeout($value) - { - $this->setTransactionTimeout($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Gets the value of the TransactionTimeout property. - * - * @return int TransactionTimeout","public function isSetTransactionTimeout() - { - return !is_null($this->_fields['TransactionTimeout']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the TransactionTimeout property. - * - * @param int TransactionTimeout - * @return this instance","public function getCaptureNow() - { - return $this->_fields['CaptureNow']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the TransactionTimeout and returns this instance - * - * @param int $value TransactionTimeout - * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","public function setCaptureNow($value) - { - $this->_fields['CaptureNow']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Checks if TransactionTimeout is set - * - * @return bool true if TransactionTimeout is set","public function withCaptureNow($value) - { - $this->setCaptureNow($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Gets the value of the CaptureNow property. - * - * @return bool CaptureNow","public function isSetCaptureNow() - { - return !is_null($this->_fields['CaptureNow']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the CaptureNow property. - * - * @param bool CaptureNow - * @return this instance","public function getSoftDescriptor() - { - return $this->_fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Sets the value of the CaptureNow and returns this instance - * - * @param bool $value CaptureNow - * @return OffAmazonPaymentsService_Model_AuthorizeRequest instance","public function setSoftDescriptor($value) - { - $this->_fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Checks if CaptureNow is set - * - * @return bool true if CaptureNow is set","public function withSoftDescriptor($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeRequest,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function isSetSoftDescriptor() - { - return !is_null($this->_fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'AuthorizeResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizeResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,* @see OffAmazonPaymentsService_Model,"public function getAuthorizeResult() - { - return $this->_fields['AuthorizeResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* OffAmazonPaymentsService_Model_AuthorizeResponse - * - * Properties: - * ","public function setAuthorizeResult($value) - { - $this->_fields['AuthorizeResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* Construct new OffAmazonPaymentsService_Model_AuthorizeResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAuthorizeResult($value) - { - $this->setAuthorizeResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* Construct OffAmazonPaymentsService_Model_AuthorizeResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_AuthorizeResponse","public function isSetAuthorizeResult() - { - return !is_null($this->_fields['AuthorizeResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* Gets the value of the AuthorizeResult. - * - * @return OffAmazonPaymentsService_Model_AuthorizeResult AuthorizeResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* Sets the value of the AuthorizeResult. - * - * @param AuthorizeResult AuthorizeResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* Sets the value of the AuthorizeResult and returns this instance - * - * @param AuthorizeResult $value AuthorizeResult - * @return OffAmazonPaymentsService_Model_AuthorizeResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* Checks if AuthorizeResult is set - * - * @return bool true if AuthorizeResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_AuthorizeResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_AuthorizeResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_AuthorizeResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'AuthorizationDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizationDetails'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_AuthorizeResult,* @see OffAmazonPaymentsService_Model,"public function getAuthorizationDetails() - { - return $this->_fields['AuthorizationDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_AuthorizeResult,"* OffAmazonPaymentsService_Model_AuthorizeResult - * - * Properties: - * ","public function setAuthorizationDetails($value) - { - $this->_fields['AuthorizationDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_AuthorizeResult,"* Construct new OffAmazonPaymentsService_Model_AuthorizeResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAuthorizationDetails($value) - { - $this->setAuthorizationDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_AuthorizeResult,"* Gets the value of the AuthorizationDetails. - * - * @return OffAmazonPaymentsService_Model_AuthorizationDetails AuthorizationDetails","public function isSetAuthorizationDetails() - { - return !is_null($this->_fields['AuthorizationDetails']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'PlatformId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'SellerNote' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'SellerBillingAgreementAttributes' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* OffAmazonPaymentsService_Model_BillingAgreementAttributes - * - * Properties: - * ","public function getPlatformId () - { - return $this->_fields['PlatformId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Construct new OffAmazonPaymentsService_Model_BillingAgreementAttributes - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setPlatformId ($value) - { - $this->_fields['PlatformId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Gets the value of the PlatformId property. - * - * @return string PlatformId","public function withPlatformId ($value) - { - $this->setPlatformId($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Sets the value of the PlatformId property. - * - * @param string PlatformId - * @return this instance","public function isSetPlatformId () - { - return ! is_null($this->_fields['PlatformId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Sets the value of the PlatformId and returns this instance - * - * @param string $value PlatformId - * @return OffAmazonPaymentsService_Model_BillingAgreementAttributes instance","public function getSellerNote () - { - return $this->_fields['SellerNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Checks if PlatformId is set - * - * @return bool true if PlatformId is set","public function setSellerNote ($value) - { - $this->_fields['SellerNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Gets the value of the SellerNote property. - * - * @return string SellerNote","public function withSellerNote ($value) - { - $this->setSellerNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Sets the value of the SellerNote property. - * - * @param string SellerNote - * @return this instance","public function isSetSellerNote () - { - return ! is_null($this->_fields['SellerNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Sets the value of the SellerNote and returns this instance - * - * @param string $value SellerNote - * @return OffAmazonPaymentsService_Model_BillingAgreementAttributes instance","public function getSellerBillingAgreementAttributes () - { - return $this->_fields['SellerBillingAgreementAttributes']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Checks if SellerNote is set - * - * @return bool true if SellerNote is set","public function setSellerBillingAgreementAttributes ($value) - { - $this->_fields['SellerBillingAgreementAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Gets the value of the SellerBillingAgreementAttributes. - * - * @return SellerBillingAgreementAttributes SellerBillingAgreementAttributes","public function withSellerBillingAgreementAttributes ($value) - { - $this->setSellerBillingAgreementAttributes($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementAttributes,"* Sets the value of the SellerBillingAgreementAttributes. - * - * @param SellerBillingAgreementAttributes SellerBillingAgreementAttributes - * @return void","public function isSetSellerBillingAgreementAttributes () - { - return ! is_null($this->_fields['SellerBillingAgreementAttributes']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'AmazonBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'BillingAgreementLimits' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementLimits' - ), - - 'Buyer' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_Buyer' - ), - - 'SellerNote' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'PlatformId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'Destination' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_Destination' - ), - - 'ReleaseEnvironment' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'SellerBillingAgreementAttributes' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes' - ), - - 'BillingAgreementStatus' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementStatus' - ), - - 'Constraints' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_Constraints' - ), - - 'CreationTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ExpirationTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'BillingAgreementConsent' => array( - 'FieldValue' => null, - 'FieldType' => 'bool' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* OffAmazonPaymentsService_Model_BillingAgreementDetails - * - * Properties: - * ","public function getAmazonBillingAgreementId () - { - return $this->_fields['AmazonBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Construct new OffAmazonPaymentsService_Model_BillingAgreementDetails - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmazonBillingAgreementId ($value) - { - $this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the AmazonBillingAgreementId property. - * - * @return string AmazonBillingAgreementId","public function withAmazonBillingAgreementId ($value) - { - $this->setAmazonBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the AmazonBillingAgreementId property. - * - * @param string AmazonBillingAgreementId - * @return this instance","public function isSetAmazonBillingAgreementId () - { - return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the AmazonBillingAgreementId and returns this instance - * - * @param string $value AmazonBillingAgreementId - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getBillingAgreementLimits () - { - return $this->_fields['BillingAgreementLimits']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if AmazonBillingAgreementId is set - * - * @return bool true if AmazonBillingAgreementId is set","public function setBillingAgreementLimits ($value) - { - $this->_fields['BillingAgreementLimits']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the BillingAgreementLimits. - * - * @return BillingAgreementLimits BillingAgreementLimits","public function withBillingAgreementLimits ($value) - { - $this->setBillingAgreementLimits($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the BillingAgreementLimits. - * - * @param BillingAgreementLimits BillingAgreementLimits - * @return void","public function isSetBillingAgreementLimits () - { - return ! is_null($this->_fields['BillingAgreementLimits']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the BillingAgreementLimits and returns this instance - * - * @param BillingAgreementLimits $value BillingAgreementLimits - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getBuyer () - { - return $this->_fields['Buyer']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if BillingAgreementLimits is set - * - * @return bool true if BillingAgreementLimits property is set","public function setBuyer ($value) - { - $this->_fields['Buyer']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the Buyer. - * - * @return Buyer Buyer","public function withBuyer ($value) - { - $this->setBuyer($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the Buyer. - * - * @param Buyer Buyer - * @return void","public function isSetBuyer () - { - return ! is_null($this->_fields['Buyer']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the Buyer and returns this instance - * - * @param Buyer $value Buyer - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getSellerNote () - { - return $this->_fields['SellerNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if Buyer is set - * - * @return bool true if Buyer property is set","public function setSellerNote ($value) - { - $this->_fields['SellerNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the SellerNote property. - * - * @return string SellerNote","public function withSellerNote ($value) - { - $this->setSellerNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the SellerNote property. - * - * @param string SellerNote - * @return this instance","public function isSetSellerNote () - { - return ! is_null($this->_fields['SellerNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the SellerNote and returns this instance - * - * @param string $value SellerNote - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getPlatformId () - { - return $this->_fields['PlatformId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if SellerNote is set - * - * @return bool true if SellerNote is set","public function setPlatformId ($value) - { - $this->_fields['PlatformId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the PlatformId property. - * - * @return string PlatformId","public function withPlatformId ($value) - { - $this->setPlatformId($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the PlatformId property. - * - * @param string PlatformId - * @return this instance","public function isSetPlatformId () - { - return ! is_null($this->_fields['PlatformId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the PlatformId and returns this instance - * - * @param string $value PlatformId - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getDestination () - { - return $this->_fields['Destination']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if PlatformId is set - * - * @return bool true if PlatformId is set","public function setDestination ($value) - { - $this->_fields['Destination']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the Destination. - * - * @return Destination Destination","public function withDestination ($value) - { - $this->setDestination($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the Destination. - * - * @param Destination Destination - * @return void","public function isSetDestination () - { - return ! is_null($this->_fields['Destination']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the Destination and returns this instance - * - * @param Destination $value Destination - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getReleaseEnvironment () - { - return $this->_fields['ReleaseEnvironment']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if Destination is set - * - * @return bool true if Destination property is set","public function setReleaseEnvironment ($value) - { - $this->_fields['ReleaseEnvironment']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the ReleaseEnvironment property. - * - * @return string ReleaseEnvironment","public function withReleaseEnvironment ($value) - { - $this->setReleaseEnvironment($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the ReleaseEnvironment property. - * - * @param string ReleaseEnvironment - * @return this instance","public function isSetReleaseEnvironment () - { - return ! is_null($this->_fields['ReleaseEnvironment']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the ReleaseEnvironment and returns this instance - * - * @param string $value ReleaseEnvironment - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getSellerBillingAgreementAttributes () - { - return $this->_fields['SellerBillingAgreementAttributes']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if ReleaseEnvironment is set - * - * @return bool true if ReleaseEnvironment is set","public function setSellerBillingAgreementAttributes ($value) - { - $this->_fields['SellerBillingAgreementAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the SellerBillingAgreementAttributes. - * - * @return SellerBillingAgreementAttributes SellerBillingAgreementAttributes","public function withSellerBillingAgreementAttributes ($value) - { - $this->setSellerBillingAgreementAttributes($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the SellerBillingAgreementAttributes. - * - * @param SellerBillingAgreementAttributes SellerBillingAgreementAttributes - * @return void","public function isSetSellerBillingAgreementAttributes () - { - return ! is_null($this->_fields['SellerBillingAgreementAttributes']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the SellerBillingAgreementAttributes and returns this instance - * - * @param SellerBillingAgreementAttributes $value SellerBillingAgreementAttributes - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getBillingAgreementStatus () - { - return $this->_fields['BillingAgreementStatus']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if SellerBillingAgreementAttributes is set - * - * @return bool true if SellerBillingAgreementAttributes property is set","public function setBillingAgreementStatus ($value) - { - $this->_fields['BillingAgreementStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the BillingAgreementStatus. - * - * @return BillingAgreementStatus BillingAgreementStatus","public function withBillingAgreementStatus ($value) - { - $this->setBillingAgreementStatus($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the BillingAgreementStatus. - * - * @param BillingAgreementStatus BillingAgreementStatus - * @return void","public function isSetBillingAgreementStatus () - { - return ! is_null($this->_fields['BillingAgreementStatus']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the BillingAgreementStatus and returns this instance - * - * @param BillingAgreementStatus $value BillingAgreementStatus - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getConstraints () - { - return $this->_fields['Constraints']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if BillingAgreementStatus is set - * - * @return bool true if BillingAgreementStatus property is set","public function setConstraints ($value) - { - $this->_fields['Constraints']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the Constraints. - * - * @return Constraints Constraints","public function withConstraints ($value) - { - $this->setConstraints($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the Constraints. - * - * @param Constraints Constraints - * @return void","public function isSetConstraints () - { - return ! is_null($this->_fields['Constraints']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the Constraints and returns this instance - * - * @param Constraints $value Constraints - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getCreationTimestamp () - { - return $this->_fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if Constraints is set - * - * @return bool true if Constraints property is set","public function setCreationTimestamp ($value) - { - $this->_fields['CreationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the CreationTimestamp property. - * - * @return string CreationTimestamp","public function withCreationTimestamp ($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the CreationTimestamp property. - * - * @param string CreationTimestamp - * @return this instance","public function isSetCreationTimestamp () - { - return ! is_null($this->_fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the CreationTimestamp and returns this instance - * - * @param string $value CreationTimestamp - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getExpirationTimestamp () - { - return $this->_fields['ExpirationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp is set","public function setExpirationTimestamp ($value) - { - $this->_fields['ExpirationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the ExpirationTimestamp property. - * - * @return string ExpirationTimestamp","public function withExpirationTimestamp ($value) - { - $this->setExpirationTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the ExpirationTimestamp property. - * - * @param string ExpirationTimestamp - * @return this instance","public function isSetExpirationTimestamp () - { - return ! is_null($this->_fields['ExpirationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the ExpirationTimestamp and returns this instance - * - * @param string $value ExpirationTimestamp - * @return OffAmazonPaymentsService_Model_BillingAgreementDetails instance","public function getBillingAgreementConsent () - { - return $this->_fields['BillingAgreementConsent']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Checks if ExpirationTimestamp is set - * - * @return bool true if ExpirationTimestamp is set","public function setBillingAgreementConsent ($value) - { - $this->_fields['BillingAgreementConsent']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Gets the value of the BillingAgreementConsent property. - * - * @return bool BillingAgreementConsent","public function withBillingAgreementConsent ($value) - { - $this->setBillingAgreementConsent($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementDetails,"* Sets the value of the BillingAgreementConsent property. - * - * @param bool BillingAgreementConsent - * @return this instance","public function isSetBillingAgreementConsent () - { - return ! is_null($this->_fields['BillingAgreementConsent']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'AmountLimitPerTimePeriod' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_Price' - ), - - 'TimePeriodStartDate' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'TimePeriodEndDate' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'CurrentRemainingBalance' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_Price' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* OffAmazonPaymentsService_Model_BillingAgreementLimits - * - * Properties: - * ","public function getAmountLimitPerTimePeriod () - { - return $this->_fields['AmountLimitPerTimePeriod']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Construct new OffAmazonPaymentsService_Model_BillingAgreementLimits - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmountLimitPerTimePeriod ($value) - { - $this->_fields['AmountLimitPerTimePeriod']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Gets the value of the AmountLimitPerTimePeriod. - * - * @return Price AmountLimitPerTimePeriod","public function withAmountLimitPerTimePeriod ($value) - { - $this->setAmountLimitPerTimePeriod($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Sets the value of the AmountLimitPerTimePeriod. - * - * @param Price AmountLimitPerTimePeriod - * @return void","public function isSetAmountLimitPerTimePeriod () - { - return ! is_null($this->_fields['AmountLimitPerTimePeriod']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Sets the value of the AmountLimitPerTimePeriod and returns this instance - * - * @param Price $value AmountLimitPerTimePeriod - * @return OffAmazonPaymentsService_Model_BillingAgreementLimits instance","public function getTimePeriodStartDate () - { - return $this->_fields['TimePeriodStartDate']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Checks if AmountLimitPerTimePeriod is set - * - * @return bool true if AmountLimitPerTimePeriod property is set","public function setTimePeriodStartDate ($value) - { - $this->_fields['TimePeriodStartDate']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Gets the value of the TimePeriodStartDate property. - * - * @return string TimePeriodStartDate","public function withTimePeriodStartDate ($value) - { - $this->setTimePeriodStartDate($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Sets the value of the TimePeriodStartDate property. - * - * @param string TimePeriodStartDate - * @return this instance","public function isSetTimePeriodStartDate () - { - return ! is_null($this->_fields['TimePeriodStartDate']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Sets the value of the TimePeriodStartDate and returns this instance - * - * @param string $value TimePeriodStartDate - * @return OffAmazonPaymentsService_Model_BillingAgreementLimits instance","public function getTimePeriodEndDate () - { - return $this->_fields['TimePeriodEndDate']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Checks if TimePeriodStartDate is set - * - * @return bool true if TimePeriodStartDate is set","public function setTimePeriodEndDate ($value) - { - $this->_fields['TimePeriodEndDate']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Gets the value of the TimePeriodEndDate property. - * - * @return string TimePeriodEndDate","public function withTimePeriodEndDate ($value) - { - $this->setTimePeriodEndDate($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Sets the value of the TimePeriodEndDate property. - * - * @param string TimePeriodEndDate - * @return this instance","public function isSetTimePeriodEndDate () - { - return ! is_null($this->_fields['TimePeriodEndDate']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Sets the value of the TimePeriodEndDate and returns this instance - * - * @param string $value TimePeriodEndDate - * @return OffAmazonPaymentsService_Model_BillingAgreementLimits instance","public function getCurrentRemainingBalance () - { - return $this->_fields['CurrentRemainingBalance']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Checks if TimePeriodEndDate is set - * - * @return bool true if TimePeriodEndDate is set","public function setCurrentRemainingBalance ($value) - { - $this->_fields['CurrentRemainingBalance']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Gets the value of the CurrentRemainingBalance. - * - * @return Price CurrentRemainingBalance","public function withCurrentRemainingBalance ($value) - { - $this->setCurrentRemainingBalance($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementLimits,"* Sets the value of the CurrentRemainingBalance. - * - * @param Price CurrentRemainingBalance - * @return void","public function isSetCurrentRemainingBalance () - { - return ! is_null($this->_fields['CurrentRemainingBalance']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'State' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'LastUpdatedTimestamp' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ReasonCode' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ReasonDescription' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* OffAmazonPaymentsService_Model_BillingAgreementStatus - * - * Properties: - * ","public function getState () - { - return $this->_fields['State']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Construct new OffAmazonPaymentsService_Model_BillingAgreementStatus - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setState ($value) - { - $this->_fields['State']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Gets the value of the State property. - * - * @return string State","public function withState ($value) - { - $this->setState($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Sets the value of the State property. - * - * @param string State - * @return this instance","public function isSetState () - { - return ! is_null($this->_fields['State']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Sets the value of the State and returns this instance - * - * @param string $value State - * @return OffAmazonPaymentsService_Model_BillingAgreementStatus instance","public function getLastUpdatedTimestamp () - { - return $this->_fields['LastUpdatedTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Checks if State is set - * - * @return bool true if State is set","public function setLastUpdatedTimestamp ($value) - { - $this->_fields['LastUpdatedTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Gets the value of the LastUpdatedTimestamp property. - * - * @return string LastUpdatedTimestamp","public function withLastUpdatedTimestamp ($value) - { - $this->setLastUpdatedTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Sets the value of the LastUpdatedTimestamp property. - * - * @param string LastUpdatedTimestamp - * @return this instance","public function isSetLastUpdatedTimestamp () - { - return ! is_null($this->_fields['LastUpdatedTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Sets the value of the LastUpdatedTimestamp and returns this instance - * - * @param string $value LastUpdatedTimestamp - * @return OffAmazonPaymentsService_Model_BillingAgreementStatus instance","public function getReasonCode () - { - return $this->_fields['ReasonCode']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Checks if LastUpdatedTimestamp is set - * - * @return bool true if LastUpdatedTimestamp is set","public function setReasonCode ($value) - { - $this->_fields['ReasonCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Gets the value of the ReasonCode property. - * - * @return string ReasonCode","public function withReasonCode ($value) - { - $this->setReasonCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Sets the value of the ReasonCode property. - * - * @param string ReasonCode - * @return this instance","public function isSetReasonCode () - { - return ! is_null($this->_fields['ReasonCode']['FieldValue']); - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Sets the value of the ReasonCode and returns this instance - * - * @param string $value ReasonCode - * @return OffAmazonPaymentsService_Model_BillingAgreementStatus instance","public function getReasonDescription () - { - return $this->_fields['ReasonDescription']['FieldValue']; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Checks if ReasonCode is set - * - * @return bool true if ReasonCode is set","public function setReasonDescription ($value) - { - $this->_fields['ReasonDescription']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Gets the value of the ReasonDescription property. - * - * @return string ReasonDescription","public function withReasonDescription ($value) - { - $this->setReasonDescription($value); - return $this; - }" -OffAmazonPaymentsService_Model_BillingAgreementStatus,"* Sets the value of the ReasonDescription property. - * - * @param string ReasonDescription - * @return this instance","public function isSetReasonDescription () - { - return ! is_null($this->_fields['ReasonDescription']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Buyer,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'Name' => array('FieldValue' => null, 'FieldType' => 'string'), - 'Email' => array('FieldValue' => null, 'FieldType' => 'string'), - 'Phone' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_Buyer,* @see OffAmazonPaymentsService_Model,"public function getName() - { - return $this->_fields['Name']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Buyer,"* OffAmazonPaymentsService_Model_Buyer - * - * Properties: - * ","public function setName($value) - { - $this->_fields['Name']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Buyer,"* Construct new OffAmazonPaymentsService_Model_Buyer - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withName($value) - { - $this->setName($value); - return $this; - }" -OffAmazonPaymentsService_Model_Buyer,"* Gets the value of the Name property. - * - * @return string Name","public function isSetName() - { - return !is_null($this->_fields['Name']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Buyer,"* Sets the value of the Name property. - * - * @param string Name - * @return this instance","public function getEmail() - { - return $this->_fields['Email']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Buyer,"* Sets the value of the Name and returns this instance - * - * @param string $value Name - * @return OffAmazonPaymentsService_Model_Buyer instance","public function setEmail($value) - { - $this->_fields['Email']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Buyer,"* Checks if Name is set - * - * @return bool true if Name is set","public function withEmail($value) - { - $this->setEmail($value); - return $this; - }" -OffAmazonPaymentsService_Model_Buyer,"* Gets the value of the Email property. - * - * @return string Email","public function isSetEmail() - { - return !is_null($this->_fields['Email']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Buyer,"* Sets the value of the Email property. - * - * @param string Email - * @return this instance","public function getPhone() - { - return $this->_fields['Phone']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Buyer,"* Sets the value of the Email and returns this instance - * - * @param string $value Email - * @return OffAmazonPaymentsService_Model_Buyer instance","public function setPhone($value) - { - $this->_fields['Phone']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Buyer,"* Checks if Email is set - * - * @return bool true if Email is set","public function withPhone($value) - { - $this->setPhone($value); - return $this; - }" -OffAmazonPaymentsService_Model_Buyer,"* Gets the value of the Phone property. - * - * @return string Phone","public function isSetPhone() - { - return !is_null($this->_fields['Phone']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'CancelationReason' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* OffAmazonPaymentsService_Model_CancelOrderReferenceRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Construct new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonOrderReferenceId() - { - return $this->_fields['AmazonOrderReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_CancelOrderReferenceRequest instance","public function setAmazonOrderReferenceId($value) - { - $this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonOrderReferenceId($value) - { - $this->setAmazonOrderReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Gets the value of the AmazonOrderReferenceId property. - * - * @return string AmazonOrderReferenceId","public function isSetAmazonOrderReferenceId() - { - return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Sets the value of the AmazonOrderReferenceId property. - * - * @param string AmazonOrderReferenceId - * @return this instance","public function getCancelationReason() - { - return $this->_fields['CancelationReason']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Sets the value of the AmazonOrderReferenceId and returns this instance - * - * @param string $value AmazonOrderReferenceId - * @return OffAmazonPaymentsService_Model_CancelOrderReferenceRequest instance","public function setCancelationReason($value) - { - $this->_fields['CancelationReason']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Checks if AmazonOrderReferenceId is set - * - * @return bool true if AmazonOrderReferenceId is set","public function withCancelationReason($value) - { - $this->setCancelationReason($value); - return $this; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceRequest,"* Gets the value of the CancelationReason property. - * - * @return string CancelationReason","public function isSetCancelationReason() - { - return !is_null($this->_fields['CancelationReason']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'CancelOrderReferenceResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CancelOrderReferenceResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,* @see OffAmazonPaymentsService_Model,"public function getCancelOrderReferenceResult() - { - return $this->_fields['CancelOrderReferenceResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* OffAmazonPaymentsService_Model_CancelOrderReferenceResponse - * - * Properties: - * ","public function setCancelOrderReferenceResult($value) - { - $this->_fields['CancelOrderReferenceResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* Construct new OffAmazonPaymentsService_Model_CancelOrderReferenceResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withCancelOrderReferenceResult($value) - { - $this->setCancelOrderReferenceResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* Construct OffAmazonPaymentsService_Model_CancelOrderReferenceResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_CancelOrderReferenceResponse","public function isSetCancelOrderReferenceResult() - { - return !is_null($this->_fields['CancelOrderReferenceResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* Gets the value of the CancelOrderReferenceResult. - * - * @return OffAmazonPaymentsService_Model_CancelOrderReferenceResult CancelOrderReferenceResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* Sets the value of the CancelOrderReferenceResult. - * - * @param CancelOrderReferenceResult CancelOrderReferenceResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* Sets the value of the CancelOrderReferenceResult and returns this instance - * - * @param CancelOrderReferenceResult $value CancelOrderReferenceResult - * @return OffAmazonPaymentsService_Model_CancelOrderReferenceResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* Checks if CancelOrderReferenceResult is set - * - * @return bool true if CancelOrderReferenceResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_CancelOrderReferenceResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CancelOrderReferenceResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CaptureDetails,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'AmazonCaptureId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'CaptureReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'SellerCaptureNote' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'CaptureAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - - 'RefundedAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - - 'CaptureFee' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - - 'IdList' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_IdList'), - - 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'CaptureStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'), - - 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CaptureDetails,* @see OffAmazonPaymentsService_Model,"public function getAmazonCaptureId() - { - return $this->_fields['AmazonCaptureId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* OffAmazonPaymentsService_Model_CaptureDetails - * - * Properties: - * ","public function setAmazonCaptureId($value) - { - $this->_fields['AmazonCaptureId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Construct new OffAmazonPaymentsService_Model_CaptureDetails - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAmazonCaptureId($value) - { - $this->setAmazonCaptureId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the AmazonCaptureId property. - * - * @return string AmazonCaptureId","public function isSetAmazonCaptureId() - { - return !is_null($this->_fields['AmazonCaptureId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the AmazonCaptureId property. - * - * @param string AmazonCaptureId - * @return this instance","public function getCaptureReferenceId() - { - return $this->_fields['CaptureReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the AmazonCaptureId and returns this instance - * - * @param string $value AmazonCaptureId - * @return OffAmazonPaymentsService_Model_CaptureDetails instance","public function setCaptureReferenceId($value) - { - $this->_fields['CaptureReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Checks if AmazonCaptureId is set - * - * @return bool true if AmazonCaptureId is set","public function withCaptureReferenceId($value) - { - $this->setCaptureReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the CaptureReferenceId property. - * - * @return string CaptureReferenceId","public function isSetCaptureReferenceId() - { - return !is_null($this->_fields['CaptureReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CaptureReferenceId property. - * - * @param string CaptureReferenceId - * @return this instance","public function getSellerCaptureNote() - { - return $this->_fields['SellerCaptureNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CaptureReferenceId and returns this instance - * - * @param string $value CaptureReferenceId - * @return OffAmazonPaymentsService_Model_CaptureDetails instance","public function setSellerCaptureNote($value) - { - $this->_fields['SellerCaptureNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Checks if CaptureReferenceId is set - * - * @return bool true if CaptureReferenceId is set","public function withSellerCaptureNote($value) - { - $this->setSellerCaptureNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the SellerCaptureNote property. - * - * @return string SellerCaptureNote","public function isSetSellerCaptureNote() - { - return !is_null($this->_fields['SellerCaptureNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the SellerCaptureNote property. - * - * @param string SellerCaptureNote - * @return this instance","public function getCaptureAmount() - { - return $this->_fields['CaptureAmount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the SellerCaptureNote and returns this instance - * - * @param string $value SellerCaptureNote - * @return OffAmazonPaymentsService_Model_CaptureDetails instance","public function setCaptureAmount($value) - { - $this->_fields['CaptureAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Checks if SellerCaptureNote is set - * - * @return bool true if SellerCaptureNote is set","public function withCaptureAmount($value) - { - $this->setCaptureAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the CaptureAmount. - * - * @return OffAmazonPaymentsService_Model_Price CaptureAmount","public function isSetCaptureAmount() - { - return !is_null($this->_fields['CaptureAmount']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CaptureAmount. - * - * @param Price CaptureAmount - * @return void","public function getRefundedAmount() - { - return $this->_fields['RefundedAmount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CaptureAmount and returns this instance - * - * @param Price $value CaptureAmount - * @return OffAmazonPaymentsService_Model_CaptureDetails instance","public function setRefundedAmount($value) - { - $this->_fields['RefundedAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Checks if CaptureAmount is set - * - * @return bool true if CaptureAmount property is set","public function withRefundedAmount($value) - { - $this->setRefundedAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the RefundedAmount. - * - * @return OffAmazonPaymentsService_Model_Price RefundedAmount","public function isSetRefundedAmount() - { - return !is_null($this->_fields['RefundedAmount']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the RefundedAmount. - * - * @param Price RefundedAmount - * @return void","public function getCaptureFee() - { - return $this->_fields['CaptureFee']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the RefundedAmount and returns this instance - * - * @param Price $value RefundedAmount - * @return OffAmazonPaymentsService_Model_CaptureDetails instance","public function setCaptureFee($value) - { - $this->_fields['CaptureFee']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Checks if RefundedAmount is set - * - * @return bool true if RefundedAmount property is set","public function withCaptureFee($value) - { - $this->setCaptureFee($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the CaptureFee. - * - * @return Price CaptureFee","public function isSetCaptureFee() - { - return !is_null($this->_fields['CaptureFee']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CaptureFee. - * - * @param Price CaptureFee - * @return void","public function getIdList() - { - return $this->_fields['IdList']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CaptureFee and returns this instance - * - * @param Price $value CaptureFee - * @return OffAmazonPaymentsService_Model_CaptureDetails instance","public function setIdList($value) - { - $this->_fields['IdList']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Checks if CaptureFee is set - * - * @return bool true if CaptureFee property is set","public function withIdList($value) - { - $this->setIdList($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the IdList. - * - * @return IdList IdList","public function isSetIdList() - { - return !is_null($this->_fields['IdList']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the IdList. - * - * @param IdList IdList - * @return void","public function getCreationTimestamp() - { - return $this->_fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the IdList and returns this instance - * - * @param IdList $value IdList - * @return OffAmazonPaymentsService_Model_CaptureDetails instance","public function setCreationTimestamp($value) - { - $this->_fields['CreationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Checks if IdList is set - * - * @return bool true if IdList property is set","public function withCreationTimestamp($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the CreationTimestamp property. - * - * @return string CreationTimestamp","public function isSetCreationTimestamp() - { - return !is_null($this->_fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CreationTimestamp property. - * - * @param string CreationTimestamp - * @return this instance","public function getCaptureStatus() - { - return $this->_fields['CaptureStatus']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CreationTimestamp and returns this instance - * - * @param string $value CreationTimestamp - * @return OffAmazonPaymentsService_Model_CaptureDetails instance","public function setCaptureStatus($value) - { - $this->_fields['CaptureStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp is set","public function withCaptureStatus($value) - { - $this->setCaptureStatus($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the CaptureStatus. - * - * @return OffAmazonPaymentsService_Model_Status CaptureStatus","public function isSetCaptureStatus() - { - return !is_null($this->_fields['CaptureStatus']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CaptureStatus. - * - * @param Status CaptureStatus - * @return void","public function getSoftDescriptor() - { - return $this->_fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Sets the value of the CaptureStatus and returns this instance - * - * @param Status $value CaptureStatus - * @return OffAmazonPaymentsService_Model_CaptureDetails instance","public function setSoftDescriptor($value) - { - $this->_fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Checks if CaptureStatus is set - * - * @return bool true if CaptureStatus property is set","public function withSoftDescriptor($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureDetails,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function isSetSoftDescriptor() - { - return !is_null($this->_fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonAuthorizationId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'CaptureReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'CaptureAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - 'SellerCaptureNote' => array('FieldValue' => null, 'FieldType' => 'string'), - 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CaptureRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* OffAmazonPaymentsService_Model_CaptureRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Construct new OffAmazonPaymentsService_Model_CaptureRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonAuthorizationId() - { - return $this->_fields['AmazonAuthorizationId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_CaptureRequest instance","public function setAmazonAuthorizationId($value) - { - $this->_fields['AmazonAuthorizationId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonAuthorizationId($value) - { - $this->setAmazonAuthorizationId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Gets the value of the AmazonAuthorizationId property. - * - * @return string AmazonAuthorizationId","public function isSetAmazonAuthorizationId() - { - return !is_null($this->_fields['AmazonAuthorizationId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the AmazonAuthorizationId property. - * - * @param string AmazonAuthorizationId - * @return this instance","public function getCaptureReferenceId() - { - return $this->_fields['CaptureReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the AmazonAuthorizationId and returns this instance - * - * @param string $value AmazonAuthorizationId - * @return OffAmazonPaymentsService_Model_CaptureRequest instance","public function setCaptureReferenceId($value) - { - $this->_fields['CaptureReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Checks if AmazonAuthorizationId is set - * - * @return bool true if AmazonAuthorizationId is set","public function withCaptureReferenceId($value) - { - $this->setCaptureReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Gets the value of the CaptureReferenceId property. - * - * @return string CaptureReferenceId","public function isSetCaptureReferenceId() - { - return !is_null($this->_fields['CaptureReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the CaptureReferenceId property. - * - * @param string CaptureReferenceId - * @return this instance","public function getCaptureAmount() - { - return $this->_fields['CaptureAmount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the CaptureReferenceId and returns this instance - * - * @param string $value CaptureReferenceId - * @return OffAmazonPaymentsService_Model_CaptureRequest instance","public function setCaptureAmount($value) - { - $this->_fields['CaptureAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Checks if CaptureReferenceId is set - * - * @return bool true if CaptureReferenceId is set","public function withCaptureAmount($value) - { - $this->setCaptureAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Gets the value of the CaptureAmount. - * - * @return OffAmazonPaymentsService_Model_Price CaptureAmount","public function isSetCaptureAmount() - { - return !is_null($this->_fields['CaptureAmount']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the CaptureAmount. - * - * @param Price CaptureAmount - * @return void","public function getSellerCaptureNote() - { - return $this->_fields['SellerCaptureNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the CaptureAmount and returns this instance - * - * @param Price $value CaptureAmount - * @return OffAmazonPaymentsService_Model_CaptureRequest instance","public function setSellerCaptureNote($value) - { - $this->_fields['SellerCaptureNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Checks if CaptureAmount is set - * - * @return bool true if CaptureAmount property is set","public function withSellerCaptureNote($value) - { - $this->setSellerCaptureNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Gets the value of the SellerCaptureNote property. - * - * @return string SellerCaptureNote","public function isSetSellerCaptureNote() - { - return !is_null($this->_fields['SellerCaptureNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the SellerCaptureNote property. - * - * @param string SellerCaptureNote - * @return this instance","public function getSoftDescriptor() - { - return $this->_fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Sets the value of the SellerCaptureNote and returns this instance - * - * @param string $value SellerCaptureNote - * @return OffAmazonPaymentsService_Model_CaptureRequest instance","public function setSoftDescriptor($value) - { - $this->_fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Checks if SellerCaptureNote is set - * - * @return bool true if SellerCaptureNote is set","public function withSoftDescriptor($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureRequest,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function isSetSoftDescriptor() - { - return !is_null($this->_fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CaptureResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'CaptureResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CaptureResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CaptureResponse,* @see OffAmazonPaymentsService_Model,"public function getCaptureResult() - { - return $this->_fields['CaptureResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* OffAmazonPaymentsService_Model_CaptureResponse - * - * Properties: - * ","public function setCaptureResult($value) - { - $this->_fields['CaptureResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* Construct new OffAmazonPaymentsService_Model_CaptureResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withCaptureResult($value) - { - $this->setCaptureResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* Construct OffAmazonPaymentsService_Model_CaptureResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_CaptureResponse","public function isSetCaptureResult() - { - return !is_null($this->_fields['CaptureResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* Gets the value of the CaptureResult. - * - * @return OffAmazonPaymentsService_Model_CaptureResult CaptureResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* Sets the value of the CaptureResult. - * - * @param CaptureResult CaptureResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* Sets the value of the CaptureResult and returns this instance - * - * @param CaptureResult $value CaptureResult - * @return OffAmazonPaymentsService_Model_CaptureResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* Checks if CaptureResult is set - * - * @return bool true if CaptureResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CaptureResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_CaptureResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CaptureResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'CaptureDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CaptureDetails'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CaptureResult,* @see OffAmazonPaymentsService_Model,"public function getCaptureDetails() - { - return $this->_fields['CaptureDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CaptureResult,"* OffAmazonPaymentsService_Model_CaptureResult - * - * Properties: - * ","public function setCaptureDetails($value) - { - $this->_fields['CaptureDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CaptureResult,"* Construct new OffAmazonPaymentsService_Model_CaptureResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withCaptureDetails($value) - { - $this->setCaptureDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_CaptureResult,"* Gets the value of the CaptureDetails. - * - * @return OffAmazonPaymentsService_Model_CaptureDetails CaptureDetails","public function isSetCaptureDetails() - { - return !is_null($this->_fields['CaptureDetails']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonAuthorizationId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ClosureReason' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* OffAmazonPaymentsService_Model_CloseAuthorizationRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Construct new OffAmazonPaymentsService_Model_CloseAuthorizationRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonAuthorizationId() - { - return $this->_fields['AmazonAuthorizationId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_CloseAuthorizationRequest instance","public function setAmazonAuthorizationId($value) - { - $this->_fields['AmazonAuthorizationId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonAuthorizationId($value) - { - $this->setAmazonAuthorizationId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Gets the value of the AmazonAuthorizationId property. - * - * @return string AmazonAuthorizationId","public function isSetAmazonAuthorizationId() - { - return !is_null($this->_fields['AmazonAuthorizationId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Sets the value of the AmazonAuthorizationId property. - * - * @param string AmazonAuthorizationId - * @return this instance","public function getClosureReason() - { - return $this->_fields['ClosureReason']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Sets the value of the AmazonAuthorizationId and returns this instance - * - * @param string $value AmazonAuthorizationId - * @return OffAmazonPaymentsService_Model_CloseAuthorizationRequest instance","public function setClosureReason($value) - { - $this->_fields['ClosureReason']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Checks if AmazonAuthorizationId is set - * - * @return bool true if AmazonAuthorizationId is set","public function withClosureReason($value) - { - $this->setClosureReason($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationRequest,"* Gets the value of the ClosureReason property. - * - * @return string ClosureReason","public function isSetClosureReason() - { - return !is_null($this->_fields['ClosureReason']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'CloseAuthorizationResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CloseAuthorizationResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,* @see OffAmazonPaymentsService_Model,"public function getCloseAuthorizationResult() - { - return $this->_fields['CloseAuthorizationResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* OffAmazonPaymentsService_Model_CloseAuthorizationResponse - * - * Properties: - * ","public function setCloseAuthorizationResult($value) - { - $this->_fields['CloseAuthorizationResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* Construct new OffAmazonPaymentsService_Model_CloseAuthorizationResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withCloseAuthorizationResult($value) - { - $this->setCloseAuthorizationResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* Construct OffAmazonPaymentsService_Model_CloseAuthorizationResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse","public function isSetCloseAuthorizationResult() - { - return !is_null($this->_fields['CloseAuthorizationResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* Gets the value of the CloseAuthorizationResult. - * - * @return CloseAuthorizationResult CloseAuthorizationResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* Sets the value of the CloseAuthorizationResult. - * - * @param CloseAuthorizationResult CloseAuthorizationResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* Sets the value of the CloseAuthorizationResult and returns this instance - * - * @param CloseAuthorizationResult $value CloseAuthorizationResult - * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* Checks if CloseAuthorizationResult is set - * - * @return bool true if CloseAuthorizationResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_CloseAuthorizationResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CloseAuthorizationResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'AmazonBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'SellerId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ClosureReason' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'ReasonCode' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* OffAmazonPaymentsService_Model_CloseBillingAgreementRequest - * - * Properties: - * ","public function getAmazonBillingAgreementId () - { - return $this->_fields['AmazonBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Construct new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmazonBillingAgreementId ($value) - { - $this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Gets the value of the AmazonBillingAgreementId property. - * - * @return string AmazonBillingAgreementId","public function withAmazonBillingAgreementId ($value) - { - $this->setAmazonBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Sets the value of the AmazonBillingAgreementId property. - * - * @param string AmazonBillingAgreementId - * @return this instance","public function isSetAmazonBillingAgreementId () - { - return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Sets the value of the AmazonBillingAgreementId and returns this instance - * - * @param string $value AmazonBillingAgreementId - * @return OffAmazonPaymentsService_Model_CloseBillingAgreementRequest instance","public function getSellerId () - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Checks if AmazonBillingAgreementId is set - * - * @return bool true if AmazonBillingAgreementId is set","public function setSellerId ($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function withSellerId ($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function isSetSellerId () - { - return ! is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_CloseBillingAgreementRequest instance","public function getClosureReason () - { - return $this->_fields['ClosureReason']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function setClosureReason ($value) - { - $this->_fields['ClosureReason']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Gets the value of the ClosureReason property. - * - * @return string ClosureReason","public function withClosureReason ($value) - { - $this->setClosureReason($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Sets the value of the ClosureReason property. - * - * @param string ClosureReason - * @return this instance","public function isSetClosureReason () - { - return ! is_null($this->_fields['ClosureReason']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Sets the value of the ClosureReason and returns this instance - * - * @param string $value ClosureReason - * @return OffAmazonPaymentsService_Model_CloseBillingAgreementRequest instance","public function getReasonCode () - { - return $this->_fields['ReasonCode']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Checks if ClosureReason is set - * - * @return bool true if ClosureReason is set","public function setReasonCode ($value) - { - $this->_fields['ReasonCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Gets the value of the ReasonCode property. - * - * @return string ReasonCode","public function withReasonCode ($value) - { - $this->setReasonCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementRequest,"* Sets the value of the ReasonCode property. - * - * @param string ReasonCode - * @return this instance","public function isSetReasonCode () - { - return ! is_null($this->_fields['ReasonCode']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'CloseBillingAgreementResult' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_CloseBillingAgreementResult' - ), - - 'ResponseMetadata' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* OffAmazonPaymentsService_Model_CloseBillingAgreementResponse - * - * Properties: - * ","public function getCloseBillingAgreementResult () - { - return $this->_fields['CloseBillingAgreementResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Construct new OffAmazonPaymentsService_Model_CloseBillingAgreementResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setCloseBillingAgreementResult ($value) - { - $this->_fields['CloseBillingAgreementResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Construct OffAmazonPaymentsService_Model_CloseBillingAgreementResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse","public function withCloseBillingAgreementResult ($value) - { - $this->setCloseBillingAgreementResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Gets the value of the CloseBillingAgreementResult. - * - * @return CloseBillingAgreementResult CloseBillingAgreementResult","public function isSetCloseBillingAgreementResult () - { - return ! is_null($this->_fields['CloseBillingAgreementResult']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Sets the value of the CloseBillingAgreementResult. - * - * @param CloseBillingAgreementResult CloseBillingAgreementResult - * @return void","public function getResponseMetadata () - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Sets the value of the CloseBillingAgreementResult and returns this instance - * - * @param CloseBillingAgreementResult $value CloseBillingAgreementResult - * @return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse instance","public function setResponseMetadata ($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Checks if CloseBillingAgreementResult is set - * - * @return bool true if CloseBillingAgreementResult property is set","public function withResponseMetadata ($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function isSetResponseMetadata () - { - return ! is_null($this->_fields['ResponseMetadata']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function toXML () - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse instance","public function getResponseHeaderMetadata () - { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResponse,"* Checks if ResponseMetadata is set - * - * @return bool true if ResponseMetadata property is set","public function setResponseHeaderMetadata ($responseHeaderMetadata) - { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CloseBillingAgreementResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array(); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ClosureReason' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* OffAmazonPaymentsService_Model_CloseOrderReferenceRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Construct new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonOrderReferenceId() - { - return $this->_fields['AmazonOrderReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_CloseOrderReferenceRequest instance","public function setAmazonOrderReferenceId($value) - { - $this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonOrderReferenceId($value) - { - $this->setAmazonOrderReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Gets the value of the AmazonOrderReferenceId property. - * - * @return string AmazonOrderReferenceId","public function isSetAmazonOrderReferenceId() - { - return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Sets the value of the AmazonOrderReferenceId property. - * - * @param string AmazonOrderReferenceId - * @return this instance","public function getClosureReason() - { - return $this->_fields['ClosureReason']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Sets the value of the AmazonOrderReferenceId and returns this instance - * - * @param string $value AmazonOrderReferenceId - * @return OffAmazonPaymentsService_Model_CloseOrderReferenceRequest instance","public function setClosureReason($value) - { - $this->_fields['ClosureReason']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Checks if AmazonOrderReferenceId is set - * - * @return bool true if AmazonOrderReferenceId is set","public function withClosureReason($value) - { - $this->setClosureReason($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceRequest,"* Gets the value of the ClosureReason property. - * - * @return string ClosureReason","public function isSetClosureReason() - { - return !is_null($this->_fields['ClosureReason']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'CloseOrderReferenceResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CloseOrderReferenceResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,* @see OffAmazonPaymentsService_Model,"public function getCloseOrderReferenceResult() - { - return $this->_fields['CloseOrderReferenceResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* OffAmazonPaymentsService_Model_CloseOrderReferenceResponse - * - * Properties: - * ","public function setCloseOrderReferenceResult($value) - { - $this->_fields['CloseOrderReferenceResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* Construct new OffAmazonPaymentsService_Model_CloseOrderReferenceResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withCloseOrderReferenceResult($value) - { - $this->setCloseOrderReferenceResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* Construct OffAmazonPaymentsService_Model_CloseOrderReferenceResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse","public function isSetCloseOrderReferenceResult() - { - return !is_null($this->_fields['CloseOrderReferenceResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* Gets the value of the CloseOrderReferenceResult. - * - * @return CloseOrderReferenceResult CloseOrderReferenceResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* Sets the value of the CloseOrderReferenceResult. - * - * @param CloseOrderReferenceResult CloseOrderReferenceResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* Sets the value of the CloseOrderReferenceResult and returns this instance - * - * @param CloseOrderReferenceResult $value CloseOrderReferenceResult - * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* Checks if CloseOrderReferenceResult is set - * - * @return bool true if CloseOrderReferenceResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CloseOrderReferenceResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'SellerId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'AmazonBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,"* OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest - * - * Properties: - * ","public function getSellerId () - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,"* Construct new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setSellerId ($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function withSellerId ($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function isSetSellerId () - { - return ! is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest instance","public function getAmazonBillingAgreementId () - { - return $this->_fields['AmazonBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function setAmazonBillingAgreementId ($value) - { - $this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,"* Gets the value of the AmazonBillingAgreementId property. - * - * @return string AmazonBillingAgreementId","public function withAmazonBillingAgreementId ($value) - { - $this->setAmazonBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest,"* Sets the value of the AmazonBillingAgreementId property. - * - * @param string AmazonBillingAgreementId - * @return this instance","public function isSetAmazonBillingAgreementId () - { - return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'ConfirmBillingAgreementResult' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_ConfirmBillingAgreementResult' - ), - - 'ResponseMetadata' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse - * - * Properties: - * ","public function getConfirmBillingAgreementResult () - { - return $this->_fields['ConfirmBillingAgreementResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Construct new OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setConfirmBillingAgreementResult ($value) - { - $this->_fields['ConfirmBillingAgreementResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Construct OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse","public function withConfirmBillingAgreementResult ($value) - { - $this->setConfirmBillingAgreementResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Gets the value of the ConfirmBillingAgreementResult. - * - * @return ConfirmBillingAgreementResult ConfirmBillingAgreementResult","public function isSetConfirmBillingAgreementResult () - { - return ! is_null($this->_fields['ConfirmBillingAgreementResult']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Sets the value of the ConfirmBillingAgreementResult. - * - * @param ConfirmBillingAgreementResult ConfirmBillingAgreementResult - * @return void","public function getResponseMetadata () - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Sets the value of the ConfirmBillingAgreementResult and returns this instance - * - * @param ConfirmBillingAgreementResult $value ConfirmBillingAgreementResult - * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse instance","public function setResponseMetadata ($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Checks if ConfirmBillingAgreementResult is set - * - * @return bool true if ConfirmBillingAgreementResult property is set","public function withResponseMetadata ($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function isSetResponseMetadata () - { - return ! is_null($this->_fields['ResponseMetadata']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function toXML () - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse instance","public function getResponseHeaderMetadata () - { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse,"* Checks if ResponseMetadata is set - * - * @return bool true if ResponseMetadata property is set","public function setResponseHeaderMetadata ($responseHeaderMetadata) - { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_ConfirmBillingAgreementResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array(); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,* @see OffAmazonPaymentsService_Model,"public function getAmazonOrderReferenceId() - { - return $this->_fields['AmazonOrderReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,"* OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest - * - * Properties: - * ","public function setAmazonOrderReferenceId($value) - { - $this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,"* Construct new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAmazonOrderReferenceId($value) - { - $this->setAmazonOrderReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,"* Gets the value of the AmazonOrderReferenceId property. - * - * @return string AmazonOrderReferenceId","public function isSetAmazonOrderReferenceId() - { - return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,"* Sets the value of the AmazonOrderReferenceId property. - * - * @param string AmazonOrderReferenceId - * @return this instance","public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,"* Sets the value of the AmazonOrderReferenceId and returns this instance - * - * @param string $value AmazonOrderReferenceId - * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest instance","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,"* Checks if AmazonOrderReferenceId is set - * - * @return bool true if AmazonOrderReferenceId is set","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,* @see OffAmazonPaymentsService_Model,"public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,"* OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse - * - * Properties: - * ","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,"* Construct new OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,"* Construct OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_Constraint,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'ConstraintID' => array('FieldValue' => null, 'FieldType' => 'string'), - 'Description' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_Constraint,* @see OffAmazonPaymentsService_Model,"public function getConstraintID() - { - return $this->_fields['ConstraintID']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Constraint,"* OffAmazonPaymentsService_Model_Constraint - * - * Properties: - * ","public function setConstraintID($value) - { - $this->_fields['ConstraintID']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Constraint,"* Construct new OffAmazonPaymentsService_Model_Constraint - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withConstraintID($value) - { - $this->setConstraintID($value); - return $this; - }" -OffAmazonPaymentsService_Model_Constraint,"* Gets the value of the ConstraintID property. - * - * @return string ConstraintID","public function isSetConstraintID() - { - return !is_null($this->_fields['ConstraintID']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Constraint,"* Sets the value of the ConstraintID property. - * - * @param string ConstraintID - * @return this instance","public function getDescription() - { - return $this->_fields['Description']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Constraint,"* Sets the value of the ConstraintID and returns this instance - * - * @param string $value ConstraintID - * @return OffAmazonPaymentsService_Model_Constraint instance","public function setDescription($value) - { - $this->_fields['Description']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Constraint,"* Checks if ConstraintID is set - * - * @return bool true if ConstraintID is set","public function withDescription($value) - { - $this->setDescription($value); - return $this; - }" -OffAmazonPaymentsService_Model_Constraint,"* Gets the value of the Description property. - * - * @return string Description","public function isSetDescription() - { - return !is_null($this->_fields['Description']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Constraints,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'Constraint' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsService_Model_Constraint')), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_Constraints,* @see OffAmazonPaymentsService_Model,"public function getConstraint() - { - return $this->_fields['Constraint']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Constraints,"* OffAmazonPaymentsService_Model_Constraints - * - * Properties: - * ","public function setConstraint($constraint) - { - if (!$this->_isNumericArray($constraint)) { - $constraint = array ($constraint); - }" -OffAmazonPaymentsService_Model_Constraints,"* Construct new OffAmazonPaymentsService_Model_Constraints - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withConstraint($constraintArgs) - { - foreach (func_get_args() as $constraint) { - $this->_fields['Constraint']['FieldValue'][] = $constraint; - }" -OffAmazonPaymentsService_Model_Constraints,"* Gets the value of the Constraint. - * - * @return array of Constraint Constraint","public function isSetConstraint() - { - return count ($this->_fields['Constraint']['FieldValue']) > 0; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'Id' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'SellerId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'IdType' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'InheritShippingAddress' => array( - 'FieldValue' => null, - 'FieldType' => 'bool' - ), - 'ConfirmNow' => array( - 'FieldValue' => null, - 'FieldType' => 'bool' - ), - - 'OrderReferenceAttributes' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceAttributes' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest - * - * Properties: - * ","public function getId () - { - return $this->_fields['Id']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Construct new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setId ($value) - { - $this->_fields['Id']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Gets the value of the Id property. - * - * @return string Id","public function withId ($value) - { - $this->setId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the Id property. - * - * @param string Id - * @return this instance","public function isSetId () - { - return ! is_null($this->_fields['Id']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the Id and returns this instance - * - * @param string $value Id - * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance","public function getSellerId () - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Checks if Id is set - * - * @return bool true if Id is set","public function setSellerId ($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function withSellerId ($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function isSetSellerId () - { - return ! is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance","public function getIdType () - { - return $this->_fields['IdType']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function setIdType ($value) - { - $this->_fields['IdType']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Gets the value of the IdType property. - * - * @return string IdType","public function withIdType ($value) - { - $this->setIdType($value); - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the IdType property. - * - * @param string IdType - * @return this instance","public function isSetIdType () - { - return ! is_null($this->_fields['IdType']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the IdType and returns this instance - * - * @param string $value IdType - * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance","public function getInheritShippingAddress () - { - return $this->_fields['InheritShippingAddress']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Checks if IdType is set - * - * @return bool true if IdType is set","public function setInheritShippingAddress ($value) - { - $this->_fields['InheritShippingAddress']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Gets the value of the InheritShippingAddress property. - * - * @return bool InheritShippingAddress","public function withInheritShippingAddress ($value) - { - $this->setInheritShippingAddress($value); - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the InheritShippingAddress property. - * - * @param bool InheritShippingAddress - * @return this instance","public function isSetInheritShippingAddress () - { - return ! is_null($this->_fields['InheritShippingAddress']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the InheritShippingAddress and returns this instance - * - * @param bool $value InheritShippingAddress - * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance","public function getConfirmNow () - { - return $this->_fields['ConfirmNow']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Checks if InheritShippingAddress is set - * - * @return bool true if InheritShippingAddress is set","public function setConfirmNow ($value) - { - $this->_fields['ConfirmNow']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Gets the value of the ConfirmNow property. - * - * @return bool ConfirmNow","public function withConfirmNow ($value) - { - $this->setConfirmNow($value); - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the ConfirmNow property. - * - * @param bool ConfirmNow - * @return this instance","public function isSetConfirmNow () - { - return ! is_null($this->_fields['ConfirmNow']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the ConfirmNow and returns this instance - * - * @param bool $value ConfirmNow - * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest instance","public function getOrderReferenceAttributes () - { - return $this->_fields['OrderReferenceAttributes']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Checks if ConfirmNow is set - * - * @return bool true if ConfirmNow is set","public function setOrderReferenceAttributes ($value) - { - $this->_fields['OrderReferenceAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Gets the value of the OrderReferenceAttributes. - * - * @return OrderReferenceAttributes OrderReferenceAttributes","public function withOrderReferenceAttributes ($value) - { - $this->setOrderReferenceAttributes($value); - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest,"* Sets the value of the OrderReferenceAttributes. - * - * @param OrderReferenceAttributes OrderReferenceAttributes - * @return void","public function isSetOrderReferenceAttributes () - { - return ! is_null($this->_fields['OrderReferenceAttributes']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'CreateOrderReferenceForIdResult' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult' - ), - - 'ResponseMetadata' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse - * - * Properties: - * ","public function getCreateOrderReferenceForIdResult () - { - return $this->_fields['CreateOrderReferenceForIdResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Construct new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setCreateOrderReferenceForIdResult ($value) - { - $this->_fields['CreateOrderReferenceForIdResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Construct OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse","public function withCreateOrderReferenceForIdResult ($value) - { - $this->setCreateOrderReferenceForIdResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Gets the value of the CreateOrderReferenceForIdResult. - * - * @return CreateOrderReferenceForIdResult CreateOrderReferenceForIdResult","public function isSetCreateOrderReferenceForIdResult () - { - return ! is_null($this->_fields['CreateOrderReferenceForIdResult']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Sets the value of the CreateOrderReferenceForIdResult. - * - * @param CreateOrderReferenceForIdResult CreateOrderReferenceForIdResult - * @return void","public function getResponseMetadata () - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Sets the value of the CreateOrderReferenceForIdResult and returns this instance - * - * @param CreateOrderReferenceForIdResult $value CreateOrderReferenceForIdResult - * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse instance","public function setResponseMetadata ($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Checks if CreateOrderReferenceForIdResult is set - * - * @return bool true if CreateOrderReferenceForIdResult property is set","public function withResponseMetadata ($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function isSetResponseMetadata () - { - return ! is_null($this->_fields['ResponseMetadata']['FieldValue']); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function toXML () - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse instance","public function getResponseHeaderMetadata () - { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse,"* Checks if ResponseMetadata is set - * - * @return bool true if ResponseMetadata property is set","public function setResponseHeaderMetadata ($responseHeaderMetadata) - { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'OrderReferenceDetails' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceDetails' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,"* OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult - * - * Properties: - * ","public function getOrderReferenceDetails () - { - return $this->_fields['OrderReferenceDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,"* Construct new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setOrderReferenceDetails ($value) - { - $this->_fields['OrderReferenceDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,"* Gets the value of the OrderReferenceDetails. - * - * @return OrderReferenceDetails OrderReferenceDetails","public function withOrderReferenceDetails ($value) - { - $this->setOrderReferenceDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResult,"* Sets the value of the OrderReferenceDetails. - * - * @param OrderReferenceDetails OrderReferenceDetails - * @return void","public function isSetOrderReferenceDetails () - { - return ! is_null($this->_fields['OrderReferenceDetails']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Destination,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'DestinationType' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'PhysicalDestination' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Address'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_Destination,* @see OffAmazonPaymentsService_Model,"public function getDestinationType() - { - return $this->_fields['DestinationType']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Destination,"* OffAmazonPaymentsService_Model_Destination - * - * Properties: - * ","public function setDestinationType($value) - { - $this->_fields['DestinationType']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Destination,"* Construct new OffAmazonPaymentsService_Model_Destination - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withDestinationType($value) - { - $this->setDestinationType($value); - return $this; - }" -OffAmazonPaymentsService_Model_Destination,"* Gets the value of the DestinationType property. - * - * @return string DestinationType","public function isSetDestinationType() - { - return !is_null($this->_fields['DestinationType']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Destination,"* Sets the value of the DestinationType property. - * - * @param string DestinationType - * @return this instance","public function getPhysicalDestination() - { - return $this->_fields['PhysicalDestination']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Destination,"* Sets the value of the DestinationType and returns this instance - * - * @param string $value DestinationType - * @return OffAmazonPaymentsService_Model_Destination instance","public function setPhysicalDestination($value) - { - $this->_fields['PhysicalDestination']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_Destination,"* Checks if DestinationType is set - * - * @return bool true if DestinationType is set","public function withPhysicalDestination($value) - { - $this->setPhysicalDestination($value); - return $this; - }" -OffAmazonPaymentsService_Model_Destination,"* Gets the value of the PhysicalDestination. - * - * @return OffAmazonPaymentsService_Model_Address PhysicalDestination","public function isSetPhysicalDestination() - { - return !is_null($this->_fields['PhysicalDestination']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_Error,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'Type' => array('FieldValue' => null, 'FieldType' => 'string'), - 'Code' => array('FieldValue' => null, 'FieldType' => 'string'), - 'Message' => array('FieldValue' => null, 'FieldType' => 'string'), - 'Detail' => array('FieldValue' => null, 'FieldType' => 'string'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_Error,* @see OffAmazonPaymentsService_Model,"public function getType() - { - return $this->_fields['Type']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Error,"* OffAmazonPaymentsService_Model_Error - * - * Properties: - * ","public function setType($value) - { - $this->_fields['Type']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Error,"* Construct new OffAmazonPaymentsService_Model_Error - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withType($value) - { - $this->setType($value); - return $this; - }" -OffAmazonPaymentsService_Model_Error,"* Gets the value of the Type property. - * - * @return string Type","public function isSetType() - { - return !is_null($this->_fields['Type']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Error,"* Sets the value of the Type property. - * - * @param string Type - * @return this instance","public function getCode() - { - return $this->_fields['Code']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Error,"* Sets the value of the Type and returns this instance - * - * @param string $value Type - * @return OffAmazonPaymentsService_Model_Error instance","public function setCode($value) - { - $this->_fields['Code']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Error,"* Checks if Type is set - * - * @return bool true if Type is set","public function withCode($value) - { - $this->setCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_Error,"* Gets the value of the Code property. - * - * @return string Code","public function isSetCode() - { - return !is_null($this->_fields['Code']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Error,"* Sets the value of the Code property. - * - * @param string Code - * @return this instance","public function getMessage() - { - return $this->_fields['Message']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Error,"* Sets the value of the Code and returns this instance - * - * @param string $value Code - * @return OffAmazonPaymentsService_Model_Error instance","public function setMessage($value) - { - $this->_fields['Message']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Error,"* Checks if Code is set - * - * @return bool true if Code is set","public function withMessage($value) - { - $this->setMessage($value); - return $this; - }" -OffAmazonPaymentsService_Model_Error,"* Gets the value of the Message property. - * - * @return string Message","public function isSetMessage() - { - return !is_null($this->_fields['Message']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Error,"* Sets the value of the Message property. - * - * @param string Message - * @return this instance","public function getDetail() - { - return $this->_fields['Detail']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Error,"* Sets the value of the Message and returns this instance - * - * @param string $value Message - * @return OffAmazonPaymentsService_Model_Error instance","public function setDetail($value) - { - $this->_fields['Detail']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_Error,"* Checks if Message is set - * - * @return bool true if Message is set","public function withDetail($value) - { - $this->setDetail($value); - return $this; - }" -OffAmazonPaymentsService_Model_Error,"* Gets the value of the Detail. - * - * @return Error.Detail Detail","public function isSetDetail() - { - return !is_null($this->_fields['Detail']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_ErrorResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'Error' => array('FieldValue' => array(), 'FieldType' => array('OffAmazonPaymentsService_Model_Error')), - 'RequestId' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ErrorResponse,* @see OffAmazonPaymentsService_Model,"public function getError() - { - return $this->_fields['Error']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* OffAmazonPaymentsService_Model_ErrorResponse - * - * Properties: - * ","public function setError($error) - { - if (!$this->_isNumericArray($error)) { - $error = array ($error); - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* Construct new OffAmazonPaymentsService_Model_ErrorResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withError($errorArgs) - { - foreach (func_get_args() as $error) { - $this->_fields['Error']['FieldValue'][] = $error; - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* Construct OffAmazonPaymentsService_Model_ErrorResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_ErrorResponse","public function isSetError() - { - return count ($this->_fields['Error']['FieldValue']) > 0; - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* Gets the value of the Error. - * - * @return array of Error Error","public function getRequestId() - { - return $this->_fields['RequestId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* Sets the value of the Error. - * - * @param mixed Error or an array of Error Error - * @return this instance","public function setRequestId($value) - { - $this->_fields['RequestId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* Sets single or multiple values of Error list via variable number of arguments. - * For example, to set the list with two elements, simply pass two values as arguments to this function - * withError($error1, $error2) - * - * @param Error $errorArgs one or more Error - * @return OffAmazonPaymentsService_Model_ErrorResponse instance","public function withRequestId($value) - { - $this->setRequestId($value); - return $this; - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* Checks if Error list is non-empty - * - * @return bool true if Error list is non-empty","public function isSetRequestId() - { - return !is_null($this->_fields['RequestId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* Gets the value of the RequestId property. - * - * @return string RequestId","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* Sets the value of the RequestId property. - * - * @param string RequestId - * @return this instance","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_ErrorResponse,"* Sets the value of the RequestId and returns this instance - * - * @param string $value RequestId - * @return OffAmazonPaymentsService_Model_ErrorResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonAuthorizationId' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,"* OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,"* Construct new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonAuthorizationId() - { - return $this->_fields['AmazonAuthorizationId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest instance","public function setAmazonAuthorizationId($value) - { - $this->_fields['AmazonAuthorizationId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonAuthorizationId($value) - { - $this->setAmazonAuthorizationId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest,"* Gets the value of the AmazonAuthorizationId property. - * - * @return string AmazonAuthorizationId","public function isSetAmazonAuthorizationId() - { - return !is_null($this->_fields['AmazonAuthorizationId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'GetAuthorizationDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,* @see OffAmazonPaymentsService_Model,"public function getGetAuthorizationDetailsResult() - { - return $this->_fields['GetAuthorizationDetailsResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse - * - * Properties: - * ","public function setGetAuthorizationDetailsResult($value) - { - $this->_fields['GetAuthorizationDetailsResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* Construct new OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withGetAuthorizationDetailsResult($value) - { - $this->setGetAuthorizationDetailsResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* Construct OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse","public function isSetGetAuthorizationDetailsResult() - { - return !is_null($this->_fields['GetAuthorizationDetailsResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* Gets the value of the GetAuthorizationDetailsResult. - * - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult GetAuthorizationDetailsResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* Sets the value of the GetAuthorizationDetailsResult. - * - * @param GetAuthorizationDetailsResult GetAuthorizationDetailsResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* Sets the value of the GetAuthorizationDetailsResult and returns this instance - * - * @param GetAuthorizationDetailsResult $value GetAuthorizationDetailsResult - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* Checks if GetAuthorizationDetailsResult is set - * - * @return bool true if GetAuthorizationDetailsResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'AuthorizationDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_AuthorizationDetails'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,* @see OffAmazonPaymentsService_Model,"public function getAuthorizationDetails() - { - return $this->_fields['AuthorizationDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,"* OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult - * - * Properties: - * ","public function setAuthorizationDetails($value) - { - $this->_fields['AuthorizationDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAuthorizationDetails($value) - { - $this->setAuthorizationDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetAuthorizationDetailsResult,"* Gets the value of the AuthorizationDetails. - * - * @return OffAmazonPaymentsService_Model_AuthorizationDetails AuthorizationDetails","public function isSetAuthorizationDetails() - { - return !is_null($this->_fields['AuthorizationDetails']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'AmazonBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'SellerId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'AddressConsentToken' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest - * - * Properties: - * ","public function getAmazonBillingAgreementId () - { - return $this->_fields['AmazonBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Construct new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmazonBillingAgreementId ($value) - { - $this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Gets the value of the AmazonBillingAgreementId property. - * - * @return string AmazonBillingAgreementId","public function withAmazonBillingAgreementId ($value) - { - $this->setAmazonBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Sets the value of the AmazonBillingAgreementId property. - * - * @param string AmazonBillingAgreementId - * @return this instance","public function isSetAmazonBillingAgreementId () - { - return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Sets the value of the AmazonBillingAgreementId and returns this instance - * - * @param string $value AmazonBillingAgreementId - * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest instance","public function getSellerId () - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Checks if AmazonBillingAgreementId is set - * - * @return bool true if AmazonBillingAgreementId is set","public function setSellerId ($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function withSellerId ($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function isSetSellerId () - { - return ! is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest instance","public function getAddressConsentToken () - { - return $this->_fields['AddressConsentToken']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function setAddressConsentToken ($value) - { - $this->_fields['AddressConsentToken']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Gets the value of the AddressConsentToken property. - * - * @return string AddressConsentToken","public function withAddressConsentToken ($value) - { - $this->setAddressConsentToken($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest,"* Sets the value of the AddressConsentToken property. - * - * @param string AddressConsentToken - * @return this instance","public function isSetAddressConsentToken () - { - return ! is_null($this->_fields['AddressConsentToken']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'GetBillingAgreementDetailsResult' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult' - ), - - 'ResponseMetadata' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse - * - * Properties: - * ","public function getGetBillingAgreementDetailsResult () - { - return $this->_fields['GetBillingAgreementDetailsResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Construct new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setGetBillingAgreementDetailsResult ($value) - { - $this->_fields['GetBillingAgreementDetailsResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Construct OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse","public function withGetBillingAgreementDetailsResult ($value) - { - $this->setGetBillingAgreementDetailsResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Gets the value of the GetBillingAgreementDetailsResult. - * - * @return GetBillingAgreementDetailsResult GetBillingAgreementDetailsResult","public function isSetGetBillingAgreementDetailsResult () - { - return ! is_null($this->_fields['GetBillingAgreementDetailsResult']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Sets the value of the GetBillingAgreementDetailsResult. - * - * @param GetBillingAgreementDetailsResult GetBillingAgreementDetailsResult - * @return void","public function getResponseMetadata () - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Sets the value of the GetBillingAgreementDetailsResult and returns this instance - * - * @param GetBillingAgreementDetailsResult $value GetBillingAgreementDetailsResult - * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse instance","public function setResponseMetadata ($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Checks if GetBillingAgreementDetailsResult is set - * - * @return bool true if GetBillingAgreementDetailsResult property is set","public function withResponseMetadata ($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function isSetResponseMetadata () - { - return ! is_null($this->_fields['ResponseMetadata']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function toXML () - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse instance","public function getResponseHeaderMetadata () - { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse,"* Checks if ResponseMetadata is set - * - * @return bool true if ResponseMetadata property is set","public function setResponseHeaderMetadata ($responseHeaderMetadata) - { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'BillingAgreementDetails' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementDetails' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,"* OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult - * - * Properties: - * ","public function getBillingAgreementDetails () - { - return $this->_fields['BillingAgreementDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setBillingAgreementDetails ($value) - { - $this->_fields['BillingAgreementDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,"* Gets the value of the BillingAgreementDetails. - * - * @return BillingAgreementDetails BillingAgreementDetails","public function withBillingAgreementDetails ($value) - { - $this->setBillingAgreementDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResult,"* Sets the value of the BillingAgreementDetails. - * - * @param BillingAgreementDetails BillingAgreementDetails - * @return void","public function isSetBillingAgreementDetails () - { - return ! is_null($this->_fields['BillingAgreementDetails']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonCaptureId' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,"* OffAmazonPaymentsService_Model_GetCaptureDetailsRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,"* Construct new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonCaptureId() - { - return $this->_fields['AmazonCaptureId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_GetCaptureDetailsRequest instance","public function setAmazonCaptureId($value) - { - $this->_fields['AmazonCaptureId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonCaptureId($value) - { - $this->setAmazonCaptureId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsRequest,"* Gets the value of the AmazonCaptureId property. - * - * @return string AmazonCaptureId","public function isSetAmazonCaptureId() - { - return !is_null($this->_fields['AmazonCaptureId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'GetCaptureDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetCaptureDetailsResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,* @see OffAmazonPaymentsService_Model,"public function getGetCaptureDetailsResult() - { - return $this->_fields['GetCaptureDetailsResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* OffAmazonPaymentsService_Model_GetCaptureDetailsResponse - * - * Properties: - * ","public function setGetCaptureDetailsResult($value) - { - $this->_fields['GetCaptureDetailsResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* Construct new OffAmazonPaymentsService_Model_GetCaptureDetailsResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withGetCaptureDetailsResult($value) - { - $this->setGetCaptureDetailsResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* Construct OffAmazonPaymentsService_Model_GetCaptureDetailsResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse","public function isSetGetCaptureDetailsResult() - { - return !is_null($this->_fields['GetCaptureDetailsResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* Gets the value of the GetCaptureDetailsResult. - * - * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResult GetCaptureDetailsResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* Sets the value of the GetCaptureDetailsResult. - * - * @param GetCaptureDetailsResult GetCaptureDetailsResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* Sets the value of the GetCaptureDetailsResult and returns this instance - * - * @param GetCaptureDetailsResult $value GetCaptureDetailsResult - * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* Checks if GetCaptureDetailsResult is set - * - * @return bool true if GetCaptureDetailsResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'CaptureDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_CaptureDetails'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResult,* @see OffAmazonPaymentsService_Model,"public function getCaptureDetails() - { - return $this->_fields['CaptureDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResult,"* OffAmazonPaymentsService_Model_GetCaptureDetailsResult - * - * Properties: - * ","public function setCaptureDetails($value) - { - $this->_fields['CaptureDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetCaptureDetailsResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withCaptureDetails($value) - { - $this->setCaptureDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetCaptureDetailsResult,"* Gets the value of the CaptureDetails. - * - * @return CaptureDetails CaptureDetails","public function isSetCaptureDetails() - { - return !is_null($this->_fields['CaptureDetails']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AddressConsentToken' => array('FieldValue' => null, 'FieldType' => 'string') - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,* @see OffAmazonPaymentsService_Model,"public function getAmazonOrderReferenceId() - { - return $this->_fields['AmazonOrderReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest - * - * Properties: - * ","public function setAmazonOrderReferenceId($value) - { - $this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Construct new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAmazonOrderReferenceId($value) - { - $this->setAmazonOrderReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Gets the value of the AmazonOrderReferenceId property. - * - * @return string AmazonOrderReferenceId","public function isSetAmazonOrderReferenceId() - { - return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Sets the value of the AmazonOrderReferenceId property. - * - * @param string AmazonOrderReferenceId - * @return this instance","public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Sets the value of the AmazonOrderReferenceId and returns this instance - * - * @param string $value AmazonOrderReferenceId - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest instance","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Checks if AmazonOrderReferenceId is set - * - * @return bool true if AmazonOrderReferenceId is set","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAddressConsentToken() - { - return $this->_fields['AddressConsentToken']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest instance","public function setAddressConsentToken($value) - { - $this->_fields['AddressConsentToken']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAddressConsentToken($value) - { - $this->setAddressConsentToken($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest,"* Gets the value of the AddressConsentToken property. - * - * @return string AddressConsentToken","public function isSetAddressConsentToken() - { - return !is_null($this->_fields['AddressConsentToken']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'GetOrderReferenceDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,* @see OffAmazonPaymentsService_Model,"public function getGetOrderReferenceDetailsResult() - { - return $this->_fields['GetOrderReferenceDetailsResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse - * - * Properties: - * ","public function setGetOrderReferenceDetailsResult($value) - { - $this->_fields['GetOrderReferenceDetailsResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* Construct new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withGetOrderReferenceDetailsResult($value) - { - $this->setGetOrderReferenceDetailsResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* Construct OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse","public function isSetGetOrderReferenceDetailsResult() - { - return !is_null($this->_fields['GetOrderReferenceDetailsResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* Gets the value of the GetOrderReferenceDetailsResult. - * - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult GetOrderReferenceDetailsResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* Sets the value of the GetOrderReferenceDetailsResult. - * - * @param GetOrderReferenceDetailsResult GetOrderReferenceDetailsResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* Sets the value of the GetOrderReferenceDetailsResult and returns this instance - * - * @param GetOrderReferenceDetailsResult $value GetOrderReferenceDetailsResult - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* Checks if GetOrderReferenceDetailsResult is set - * - * @return bool true if GetOrderReferenceDetailsResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'OrderReferenceDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceDetails'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,* @see OffAmazonPaymentsService_Model,"public function getOrderReferenceDetails() - { - return $this->_fields['OrderReferenceDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,"* OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult - * - * Properties: - * ","public function setOrderReferenceDetails($value) - { - $this->_fields['OrderReferenceDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withOrderReferenceDetails($value) - { - $this->setOrderReferenceDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResult,"* Gets the value of the OrderReferenceDetails. - * - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails OrderReferenceDetails","public function isSetOrderReferenceDetails() - { - return !is_null($this->_fields['OrderReferenceDetails']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetRefundDetailsRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonRefundId' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetRefundDetailsRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsRequest,"* OffAmazonPaymentsService_Model_GetRefundDetailsRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsRequest,"* Construct new OffAmazonPaymentsService_Model_GetRefundDetailsRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetRefundDetailsRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonRefundId() - { - return $this->_fields['AmazonRefundId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_GetRefundDetailsRequest instance","public function setAmazonRefundId($value) - { - $this->_fields['AmazonRefundId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonRefundId($value) - { - $this->setAmazonRefundId($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsRequest,"* Gets the value of the AmazonRefundId property. - * - * @return string AmazonRefundId","public function isSetAmazonRefundId() - { - return !is_null($this->_fields['AmazonRefundId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'GetRefundDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_GetRefundDetailsResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,* @see OffAmazonPaymentsService_Model,"public function getGetRefundDetailsResult() - { - return $this->_fields['GetRefundDetailsResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* OffAmazonPaymentsService_Model_GetRefundDetailsResponse - * - * Properties: - * ","public function setGetRefundDetailsResult($value) - { - $this->_fields['GetRefundDetailsResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* Construct new OffAmazonPaymentsService_Model_GetRefundDetailsResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withGetRefundDetailsResult($value) - { - $this->setGetRefundDetailsResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* Construct OffAmazonPaymentsService_Model_GetRefundDetailsResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse","public function isSetGetRefundDetailsResult() - { - return !is_null($this->_fields['GetRefundDetailsResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* Gets the value of the GetRefundDetailsResult. - * - * @return OffAmazonPaymentsService_Model_GetRefundDetailsResult GetRefundDetailsResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* Sets the value of the GetRefundDetailsResult. - * - * @param GetRefundDetailsResult GetRefundDetailsResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* Sets the value of the GetRefundDetailsResult and returns this instance - * - * @param GetRefundDetailsResult $value GetRefundDetailsResult - * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* Checks if GetRefundDetailsResult is set - * - * @return bool true if GetRefundDetailsResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'RefundDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_RefundDetails'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResult,* @see OffAmazonPaymentsService_Model,"public function getRefundDetails() - { - return $this->_fields['RefundDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResult,"* OffAmazonPaymentsService_Model_GetRefundDetailsResult - * - * Properties: - * ","public function setRefundDetails($value) - { - $this->_fields['RefundDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResult,"* Construct new OffAmazonPaymentsService_Model_GetRefundDetailsResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withRefundDetails($value) - { - $this->setRefundDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_GetRefundDetailsResult,"* Gets the value of the RefundDetails. - * - * @return RefundDetails RefundDetails","public function isSetRefundDetails() - { - return !is_null($this->_fields['RefundDetails']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_IdList,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'member' => array('FieldValue' => array(), 'FieldType' => array('string')), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_IdList,* @see OffAmazonPaymentsService_Model,"public function getmember() - { - return $this->_fields['member']['FieldValue']; - }" -OffAmazonPaymentsService_Model_IdList,"* OffAmazonPaymentsService_Model_IdList - * - * Properties: - * ","public function setmember($member) - { - if (!$this->_isNumericArray($member)) { - $member = array ($member); - }" -OffAmazonPaymentsService_Model_IdList,"* Construct new OffAmazonPaymentsService_Model_IdList - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withmember($stringArgs) - { - foreach (func_get_args() as $member) { - $this->_fields['member']['FieldValue'][] = $member; - }" -OffAmazonPaymentsService_Model_IdList,"* Gets the value of the member . - * - * @return array of string member","public function isSetmember() - { - return count ($this->_fields['member']['FieldValue']) > 0; - }" -OffAmazonPaymentsService_Model_OrderItemCategories,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'OrderItemCategory' => array('FieldValue' => array(), 'FieldType' => array('string')), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_OrderItemCategories,* @see OffAmazonPaymentsService_Model,"public function getOrderItemCategory() - { - return $this->_fields['OrderItemCategory']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderItemCategories,"* OffAmazonPaymentsService_Model_OrderItemCategories - * - * Properties: - * ","public function setOrderItemCategory($orderItemCategory) - { - if (!$this->_isNumericArray($orderItemCategory)) { - $orderItemCategory = array ($orderItemCategory); - }" -OffAmazonPaymentsService_Model_OrderItemCategories,"* Construct new OffAmazonPaymentsService_Model_OrderItemCategories - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withOrderItemCategory($stringArgs) - { - foreach (func_get_args() as $orderItemCategory) { - $this->_fields['OrderItemCategory']['FieldValue'][] = $orderItemCategory; - }" -OffAmazonPaymentsService_Model_OrderItemCategories,"* Gets the value of the OrderItemCategory . - * - * @return array of string OrderItemCategory","public function isSetOrderItemCategory() - { - return count ($this->_fields['OrderItemCategory']['FieldValue']) > 0; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'OrderTotal' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderTotal'), - - 'PlatformId' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'SellerNote' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'SellerOrderAttributes' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_SellerOrderAttributes'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,* @see OffAmazonPaymentsService_Model,"public function getOrderTotal() - { - return $this->_fields['OrderTotal']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* OffAmazonPaymentsService_Model_OrderReferenceAttributes - * - * Properties: - * ","public function setOrderTotal($value) - { - $this->_fields['OrderTotal']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Construct new OffAmazonPaymentsService_Model_OrderReferenceAttributes - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withOrderTotal($value) - { - $this->setOrderTotal($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Gets the value of the OrderTotal. - * - * @return OffAmazonPaymentsService_Model_OrderTotal OrderTotal","public function isSetOrderTotal() - { - return !is_null($this->_fields['OrderTotal']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Sets the value of the OrderTotal. - * - * @param OrderTotal OrderTotal - * @return void","public function getPlatformId() - { - return $this->_fields['PlatformId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Sets the value of the OrderTotal and returns this instance - * - * @param OrderTotal $value OrderTotal - * @return OffAmazonPaymentsService_Model_OrderReferenceAttributes instance","public function setPlatformId($value) - { - $this->_fields['PlatformId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Checks if OrderTotal is set - * - * @return bool true if OrderTotal property is set","public function withPlatformId($value) - { - $this->setPlatformId($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Gets the value of the PlatformId property. - * - * @return string PlatformId","public function isSetPlatformId() - { - return !is_null($this->_fields['PlatformId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Sets the value of the PlatformId property. - * - * @param string PlatformId - * @return this instance","public function getSellerNote() - { - return $this->_fields['SellerNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Sets the value of the PlatformId and returns this instance - * - * @param string $value PlatformId - * @return OffAmazonPaymentsService_Model_OrderReferenceAttributes instance","public function setSellerNote($value) - { - $this->_fields['SellerNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Checks if PlatformId is set - * - * @return bool true if PlatformId is set","public function withSellerNote($value) - { - $this->setSellerNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Gets the value of the SellerNote property. - * - * @return string SellerNote","public function isSetSellerNote() - { - return !is_null($this->_fields['SellerNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Sets the value of the SellerNote property. - * - * @param string SellerNote - * @return this instance","public function getSellerOrderAttributes() - { - return $this->_fields['SellerOrderAttributes']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Sets the value of the SellerNote and returns this instance - * - * @param string $value SellerNote - * @return OffAmazonPaymentsService_Model_OrderReferenceAttributes instance","public function setSellerOrderAttributes($value) - { - $this->_fields['SellerOrderAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Checks if SellerNote is set - * - * @return bool true if SellerNote is set","public function withSellerOrderAttributes($value) - { - $this->setSellerOrderAttributes($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceAttributes,"* Gets the value of the SellerOrderAttributes. - * - * @return OffAmazonPaymentsService_Model_SellerOrderAttributes SellerOrderAttributes","public function isSetSellerOrderAttributes() - { - return !is_null($this->_fields['SellerOrderAttributes']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'Buyer' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Buyer'), - - - 'OrderTotal' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderTotal'), - - 'SellerNote' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'PlatformId' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'Destination' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Destination'), - - 'ReleaseEnvironment' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'SellerOrderAttributes' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_SellerOrderAttributes'), - - - 'OrderReferenceStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceStatus'), - - - 'Constraints' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Constraints'), - - 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ExpirationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,* @see OffAmazonPaymentsService_Model,"public function getAmazonOrderReferenceId() - { - return $this->_fields['AmazonOrderReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* OffAmazonPaymentsService_Model_OrderReferenceDetails - * - * Properties: - * ","public function setAmazonOrderReferenceId($value) - { - $this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Construct new OffAmazonPaymentsService_Model_OrderReferenceDetails - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAmazonOrderReferenceId($value) - { - $this->setAmazonOrderReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the AmazonOrderReferenceId property. - * - * @return string AmazonOrderReferenceId","public function isSetAmazonOrderReferenceId() - { - return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the AmazonOrderReferenceId property. - * - * @param string AmazonOrderReferenceId - * @return this instance","public function getBuyer() - { - return $this->_fields['Buyer']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the AmazonOrderReferenceId and returns this instance - * - * @param string $value AmazonOrderReferenceId - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setBuyer($value) - { - $this->_fields['Buyer']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if AmazonOrderReferenceId is set - * - * @return bool true if AmazonOrderReferenceId is set","public function withBuyer($value) - { - $this->setBuyer($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the Buyer. - * - * @return OffAmazonPaymentsService_Model_Buyer Buyer","public function isSetBuyer() - { - return !is_null($this->_fields['Buyer']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the Buyer. - * - * @param Buyer Buyer - * @return void","public function getOrderTotal() - { - return $this->_fields['OrderTotal']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the Buyer and returns this instance - * - * @param Buyer $value Buyer - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setOrderTotal($value) - { - $this->_fields['OrderTotal']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if Buyer is set - * - * @return bool true if Buyer property is set","public function withOrderTotal($value) - { - $this->setOrderTotal($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the OrderTotal. - * - * @return OrderTotal OrderTotal","public function isSetOrderTotal() - { - return !is_null($this->_fields['OrderTotal']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the OrderTotal. - * - * @param OrderTotal OrderTotal - * @return void","public function getSellerNote() - { - return $this->_fields['SellerNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the OrderTotal and returns this instance - * - * @param OrderTotal $value OrderTotal - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setSellerNote($value) - { - $this->_fields['SellerNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if OrderTotal is set - * - * @return bool true if OrderTotal property is set","public function withSellerNote($value) - { - $this->setSellerNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the SellerNote property. - * - * @return string SellerNote","public function isSetSellerNote() - { - return !is_null($this->_fields['SellerNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the SellerNote property. - * - * @param string SellerNote - * @return this instance","public function getPlatformId() - { - return $this->_fields['PlatformId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the SellerNote and returns this instance - * - * @param string $value SellerNote - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setPlatformId($value) - { - $this->_fields['PlatformId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if SellerNote is set - * - * @return bool true if SellerNote is set","public function withPlatformId($value) - { - $this->setPlatformId($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the PlatformId property. - * - * @return string PlatformId","public function isSetPlatformId() - { - return !is_null($this->_fields['PlatformId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the PlatformId property. - * - * @param string PlatformId - * @return this instance","public function getDestination() - { - return $this->_fields['Destination']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the PlatformId and returns this instance - * - * @param string $value PlatformId - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setDestination($value) - { - $this->_fields['Destination']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if PlatformId is set - * - * @return bool true if PlatformId is set","public function withDestination($value) - { - $this->setDestination($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the Destination. - * - * @return OffAmazonPaymentsService_Model_Destination Destination","public function isSetDestination() - { - return !is_null($this->_fields['Destination']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the Destination. - * - * @param Destination Destination - * @return void","public function getReleaseEnvironment() - { - return $this->_fields['ReleaseEnvironment']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the Destination and returns this instance - * - * @param Destination $value Destination - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setReleaseEnvironment($value) - { - $this->_fields['ReleaseEnvironment']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if Destination is set - * - * @return bool true if Destination property is set","public function withReleaseEnvironment($value) - { - $this->setReleaseEnvironment($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the ReleaseEnvironment property. - * - * @return string ReleaseEnvironment","public function isSetReleaseEnvironment() - { - return !is_null($this->_fields['ReleaseEnvironment']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the ReleaseEnvironment property. - * - * @param string ReleaseEnvironment - * @return this instance","public function getSellerOrderAttributes() - { - return $this->_fields['SellerOrderAttributes']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the ReleaseEnvironment and returns this instance - * - * @param string $value ReleaseEnvironment - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setSellerOrderAttributes($value) - { - $this->_fields['SellerOrderAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if ReleaseEnvironment is set - * - * @return bool true if ReleaseEnvironment is set","public function withSellerOrderAttributes($value) - { - $this->setSellerOrderAttributes($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the SellerOrderAttributes. - * - * @return SellerOrderAttributes SellerOrderAttributes","public function isSetSellerOrderAttributes() - { - return !is_null($this->_fields['SellerOrderAttributes']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the SellerOrderAttributes. - * - * @param SellerOrderAttributes SellerOrderAttributes - * @return void","public function getOrderReferenceStatus() - { - return $this->_fields['OrderReferenceStatus']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the SellerOrderAttributes and returns this instance - * - * @param SellerOrderAttributes $value SellerOrderAttributes - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setOrderReferenceStatus($value) - { - $this->_fields['OrderReferenceStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if SellerOrderAttributes is set - * - * @return bool true if SellerOrderAttributes property is set","public function withOrderReferenceStatus($value) - { - $this->setOrderReferenceStatus($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the OrderReferenceStatus. - * - * @return OrderReferenceStatus OrderReferenceStatus","public function isSetOrderReferenceStatus() - { - return !is_null($this->_fields['OrderReferenceStatus']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the OrderReferenceStatus. - * - * @param OrderReferenceStatus OrderReferenceStatus - * @return void","public function getConstraints() - { - return $this->_fields['Constraints']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the OrderReferenceStatus and returns this instance - * - * @param OrderReferenceStatus $value OrderReferenceStatus - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setConstraints($value) - { - $this->_fields['Constraints']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if OrderReferenceStatus is set - * - * @return bool true if OrderReferenceStatus property is set","public function withConstraints($value) - { - $this->setConstraints($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the Constraints. - * - * @return OffAmazonPaymentsService_Model_Constraints Constraints","public function isSetConstraints() - { - return !is_null($this->_fields['Constraints']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the Constraints. - * - * @param Constraints Constraints - * @return void","public function getCreationTimestamp() - { - return $this->_fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the Constraints and returns this instance - * - * @param Constraints $value Constraints - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setCreationTimestamp($value) - { - $this->_fields['CreationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if Constraints is set - * - * @return bool true if Constraints property is set","public function withCreationTimestamp($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the CreationTimestamp property. - * - * @return string CreationTimestamp","public function isSetCreationTimestamp() - { - return !is_null($this->_fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the CreationTimestamp property. - * - * @param string CreationTimestamp - * @return this instance","public function getExpirationTimestamp() - { - return $this->_fields['ExpirationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Sets the value of the CreationTimestamp and returns this instance - * - * @param string $value CreationTimestamp - * @return OffAmazonPaymentsService_Model_OrderReferenceDetails instance","public function setExpirationTimestamp($value) - { - $this->_fields['ExpirationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp is set","public function withExpirationTimestamp($value) - { - $this->setExpirationTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceDetails,"* Gets the value of the ExpirationTimestamp property. - * - * @return string ExpirationTimestamp","public function isSetExpirationTimestamp() - { - return !is_null($this->_fields['ExpirationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'State' => array('FieldValue' => null, 'FieldType' => 'string'), - 'LastUpdateTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ReasonCode' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ReasonDescription' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,* @see OffAmazonPaymentsService_Model,"public function getState() - { - return $this->_fields['State']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* OffAmazonPaymentsService_Model_OrderReferenceStatus - * - * Properties: - * ","public function setState($value) - { - $this->_fields['State']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Construct new OffAmazonPaymentsService_Model_OrderReferenceStatus - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withState($value) - { - $this->setState($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Gets the value of the State property. - * - * @return string State","public function isSetState() - { - return !is_null($this->_fields['State']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Sets the value of the State property. - * - * @param string State - * @return this instance","public function getLastUpdateTimestamp() - { - return $this->_fields['LastUpdateTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Sets the value of the State and returns this instance - * - * @param string $value State - * @return OffAmazonPaymentsService_Model_OrderReferenceStatus instance","public function setLastUpdateTimestamp($value) - { - $this->_fields['LastUpdateTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Checks if State is set - * - * @return bool true if State is set","public function withLastUpdateTimestamp($value) - { - $this->setLastUpdateTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Gets the value of the LastUpdateTimestamp property. - * - * @return string LastUpdateTimestamp","public function isSetLastUpdateTimestamp() - { - return !is_null($this->_fields['LastUpdateTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Sets the value of the LastUpdateTimestamp property. - * - * @param string LastUpdateTimestamp - * @return this instance","public function getReasonCode() - { - return $this->_fields['ReasonCode']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Sets the value of the LastUpdateTimestamp and returns this instance - * - * @param string $value LastUpdateTimestamp - * @return OffAmazonPaymentsService_Model_OrderReferenceStatus instance","public function setReasonCode($value) - { - $this->_fields['ReasonCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Checks if LastUpdateTimestamp is set - * - * @return bool true if LastUpdateTimestamp is set","public function withReasonCode($value) - { - $this->setReasonCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Gets the value of the ReasonCode property. - * - * @return string ReasonCode","public function isSetReasonCode() - { - return !is_null($this->_fields['ReasonCode']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Sets the value of the ReasonCode property. - * - * @param string ReasonCode - * @return this instance","public function getReasonDescription() - { - return $this->_fields['ReasonDescription']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Sets the value of the ReasonCode and returns this instance - * - * @param string $value ReasonCode - * @return OffAmazonPaymentsService_Model_OrderReferenceStatus instance","public function setReasonDescription($value) - { - $this->_fields['ReasonDescription']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Checks if ReasonCode is set - * - * @return bool true if ReasonCode is set","public function withReasonDescription($value) - { - $this->setReasonDescription($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderReferenceStatus,"* Gets the value of the ReasonDescription property. - * - * @return string ReasonDescription","public function isSetReasonDescription() - { - return !is_null($this->_fields['ReasonDescription']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderTotal,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'CurrencyCode' => array('FieldValue' => null, 'FieldType' => 'string'), - 'Amount' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_OrderTotal,* @see OffAmazonPaymentsService_Model,"public function getCurrencyCode() - { - return $this->_fields['CurrencyCode']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderTotal,"* OffAmazonPaymentsService_Model_OrderTotal - * - * Properties: - * ","public function setCurrencyCode($value) - { - $this->_fields['CurrencyCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderTotal,"* Construct new OffAmazonPaymentsService_Model_OrderTotal - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withCurrencyCode($value) - { - $this->setCurrencyCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderTotal,"* Gets the value of the CurrencyCode property. - * - * @return string CurrencyCode","public function isSetCurrencyCode() - { - return !is_null($this->_fields['CurrencyCode']['FieldValue']); - }" -OffAmazonPaymentsService_Model_OrderTotal,"* Sets the value of the CurrencyCode property. - * - * @param string CurrencyCode - * @return this instance","public function getAmount() - { - return $this->_fields['Amount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_OrderTotal,"* Sets the value of the CurrencyCode and returns this instance - * - * @param string $value CurrencyCode - * @return OffAmazonPaymentsService_Model_OrderTotal instance","public function setAmount($value) - { - $this->_fields['Amount']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_OrderTotal,"* Checks if CurrencyCode is set - * - * @return bool true if CurrencyCode is set","public function withAmount($value) - { - $this->setAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_OrderTotal,"* Gets the value of the Amount property. - * - * @return string Amount","public function isSetAmount() - { - return !is_null($this->_fields['Amount']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Price,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'Amount' => array('FieldValue' => null, 'FieldType' => 'string'), - 'CurrencyCode' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_Price,* @see OffAmazonPaymentsService_Model,"public function getAmount() - { - return $this->_fields['Amount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Price,"* OffAmazonPaymentsService_Model_Price - * - * Properties: - * ","public function setAmount($value) - { - $this->_fields['Amount']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Price,"* Construct new OffAmazonPaymentsService_Model_Price - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAmount($value) - { - $this->setAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_Price,"* Gets the value of the Amount property. - * - * @return float Amount","public function isSetAmount() - { - return !is_null($this->_fields['Amount']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Price,"* Sets the value of the Amount property. - * - * @param string Amount - * @return this instance","public function getCurrencyCode() - { - return $this->_fields['CurrencyCode']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Price,"* Sets the value of the Amount and returns this instance - * - * @param string $value Amount - * @return OffAmazonPaymentsService_Model_Price instance","public function setCurrencyCode($value) - { - $this->_fields['CurrencyCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Price,"* Checks if Amount is set - * - * @return bool true if Amount is set","public function withCurrencyCode($value) - { - $this->setCurrencyCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_Price,"* Gets the value of the CurrencyCode property. - * - * @return string CurrencyCode","public function isSetCurrencyCode() - { - return !is_null($this->_fields['CurrencyCode']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundDetails,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'AmazonRefundId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'RefundReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'SellerRefundNote' => array('FieldValue' => null, 'FieldType' => 'string'), - 'RefundType' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'RefundAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - - 'FeeRefunded' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - 'CreationTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'RefundStatus' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Status'), - - 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_RefundDetails,* @see OffAmazonPaymentsService_Model,"public function getAmazonRefundId() - { - return $this->_fields['AmazonRefundId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* OffAmazonPaymentsService_Model_RefundDetails - * - * Properties: - * ","public function setAmazonRefundId($value) - { - $this->_fields['AmazonRefundId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Construct new OffAmazonPaymentsService_Model_RefundDetails - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withAmazonRefundId($value) - { - $this->setAmazonRefundId($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Gets the value of the AmazonRefundId property. - * - * @return string AmazonRefundId","public function isSetAmazonRefundId() - { - return !is_null($this->_fields['AmazonRefundId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the AmazonRefundId property. - * - * @param string AmazonRefundId - * @return this instance","public function getRefundReferenceId() - { - return $this->_fields['RefundReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the AmazonRefundId and returns this instance - * - * @param string $value AmazonRefundId - * @return OffAmazonPaymentsService_Model_RefundDetails instance","public function setRefundReferenceId($value) - { - $this->_fields['RefundReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Checks if AmazonRefundId is set - * - * @return bool true if AmazonRefundId is set","public function withRefundReferenceId($value) - { - $this->setRefundReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Gets the value of the RefundReferenceId property. - * - * @return string RefundReferenceId","public function isSetRefundReferenceId() - { - return !is_null($this->_fields['RefundReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the RefundReferenceId property. - * - * @param string RefundReferenceId - * @return this instance","public function getSellerRefundNote() - { - return $this->_fields['SellerRefundNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the RefundReferenceId and returns this instance - * - * @param string $value RefundReferenceId - * @return OffAmazonPaymentsService_Model_RefundDetails instance","public function setSellerRefundNote($value) - { - $this->_fields['SellerRefundNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Checks if RefundReferenceId is set - * - * @return bool true if RefundReferenceId is set","public function withSellerRefundNote($value) - { - $this->setSellerRefundNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Gets the value of the SellerRefundNote property. - * - * @return string SellerRefundNote","public function isSetSellerRefundNote() - { - return !is_null($this->_fields['SellerRefundNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the SellerRefundNote property. - * - * @param string SellerRefundNote - * @return this instance","public function getRefundType() - { - return $this->_fields['RefundType']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the SellerRefundNote and returns this instance - * - * @param string $value SellerRefundNote - * @return OffAmazonPaymentsService_Model_RefundDetails instance","public function setRefundType($value) - { - $this->_fields['RefundType']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Checks if SellerRefundNote is set - * - * @return bool true if SellerRefundNote is set","public function withRefundType($value) - { - $this->setRefundType($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Gets the value of the RefundType property. - * - * @return string RefundType","public function isSetRefundType() - { - return !is_null($this->_fields['RefundType']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the RefundType property. - * - * @param string RefundType - * @return this instance","public function getRefundAmount() - { - return $this->_fields['RefundAmount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the RefundType and returns this instance - * - * @param string $value RefundType - * @return OffAmazonPaymentsService_Model_RefundDetails instance","public function setRefundAmount($value) - { - $this->_fields['RefundAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Checks if RefundType is set - * - * @return bool true if RefundType is set","public function withRefundAmount($value) - { - $this->setRefundAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Gets the value of the RefundAmount. - * - * @return OffAmazonPaymentsService_Model_Price RefundAmount","public function isSetRefundAmount() - { - return !is_null($this->_fields['RefundAmount']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the RefundAmount. - * - * @param Price RefundAmount - * @return void","public function getFeeRefunded() - { - return $this->_fields['FeeRefunded']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the RefundAmount and returns this instance - * - * @param Price $value RefundAmount - * @return OffAmazonPaymentsService_Model_RefundDetails instance","public function setFeeRefunded($value) - { - $this->_fields['FeeRefunded']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Checks if RefundAmount is set - * - * @return bool true if RefundAmount property is set","public function withFeeRefunded($value) - { - $this->setFeeRefunded($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Gets the value of the FeeRefunded. - * - * @return Price FeeRefunded","public function isSetFeeRefunded() - { - return !is_null($this->_fields['FeeRefunded']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the FeeRefunded. - * - * @param Price FeeRefunded - * @return void","public function getCreationTimestamp() - { - return $this->_fields['CreationTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the FeeRefunded and returns this instance - * - * @param Price $value FeeRefunded - * @return OffAmazonPaymentsService_Model_RefundDetails instance","public function setCreationTimestamp($value) - { - $this->_fields['CreationTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Checks if FeeRefunded is set - * - * @return bool true if FeeRefunded property is set","public function withCreationTimestamp($value) - { - $this->setCreationTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Gets the value of the CreationTimestamp property. - * - * @return string CreationTimestamp","public function isSetCreationTimestamp() - { - return !is_null($this->_fields['CreationTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the CreationTimestamp property. - * - * @param string CreationTimestamp - * @return this instance","public function getRefundStatus() - { - return $this->_fields['RefundStatus']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the CreationTimestamp and returns this instance - * - * @param string $value CreationTimestamp - * @return OffAmazonPaymentsService_Model_RefundDetails instance","public function setRefundStatus($value) - { - $this->_fields['RefundStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Checks if CreationTimestamp is set - * - * @return bool true if CreationTimestamp is set","public function withRefundStatus($value) - { - $this->setRefundStatus($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Gets the value of the RefundStatus. - * - * @return OffAmazonPaymentsService_Model_Status RefundStatus","public function isSetRefundStatus() - { - return !is_null($this->_fields['RefundStatus']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the RefundStatus. - * - * @param Status RefundStatus - * @return void","public function getSoftDescriptor() - { - return $this->_fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Sets the value of the RefundStatus and returns this instance - * - * @param Status $value RefundStatus - * @return OffAmazonPaymentsService_Model_RefundDetails instance","public function setSoftDescriptor($value) - { - $this->_fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Checks if RefundStatus is set - * - * @return bool true if RefundStatus property is set","public function withSoftDescriptor($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundDetails,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function isSetSoftDescriptor() - { - return !is_null($this->_fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonCaptureId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'RefundReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'RefundAmount' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_Price'), - - 'SellerRefundNote' => array('FieldValue' => null, 'FieldType' => 'string'), - 'SoftDescriptor' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_RefundRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* OffAmazonPaymentsService_Model_RefundRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Construct new OffAmazonPaymentsService_Model_RefundRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonCaptureId() - { - return $this->_fields['AmazonCaptureId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_RefundRequest instance","public function setAmazonCaptureId($value) - { - $this->_fields['AmazonCaptureId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonCaptureId($value) - { - $this->setAmazonCaptureId($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Gets the value of the AmazonCaptureId property. - * - * @return string AmazonCaptureId","public function isSetAmazonCaptureId() - { - return !is_null($this->_fields['AmazonCaptureId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the AmazonCaptureId property. - * - * @param string AmazonCaptureId - * @return this instance","public function getRefundReferenceId() - { - return $this->_fields['RefundReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the AmazonCaptureId and returns this instance - * - * @param string $value AmazonCaptureId - * @return OffAmazonPaymentsService_Model_RefundRequest instance","public function setRefundReferenceId($value) - { - $this->_fields['RefundReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Checks if AmazonCaptureId is set - * - * @return bool true if AmazonCaptureId is set","public function withRefundReferenceId($value) - { - $this->setRefundReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Gets the value of the RefundReferenceId property. - * - * @return string RefundReferenceId","public function isSetRefundReferenceId() - { - return !is_null($this->_fields['RefundReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the RefundReferenceId property. - * - * @param string RefundReferenceId - * @return this instance","public function getRefundAmount() - { - return $this->_fields['RefundAmount']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the RefundReferenceId and returns this instance - * - * @param string $value RefundReferenceId - * @return OffAmazonPaymentsService_Model_RefundRequest instance","public function setRefundAmount($value) - { - $this->_fields['RefundAmount']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Checks if RefundReferenceId is set - * - * @return bool true if RefundReferenceId is set","public function withRefundAmount($value) - { - $this->setRefundAmount($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Gets the value of the RefundAmount. - * - * @return OffAmazonPaymentsService_Model_Price RefundAmount","public function isSetRefundAmount() - { - return !is_null($this->_fields['RefundAmount']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the RefundAmount. - * - * @param OffAmazonPaymentsService_Model_Price RefundAmount - * @return void","public function getSellerRefundNote() - { - return $this->_fields['SellerRefundNote']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the RefundAmount and returns this instance - * - * @param Price $value RefundAmount - * @return OffAmazonPaymentsService_Model_RefundRequest instance","public function setSellerRefundNote($value) - { - $this->_fields['SellerRefundNote']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Checks if RefundAmount is set - * - * @return bool true if RefundAmount property is set","public function withSellerRefundNote($value) - { - $this->setSellerRefundNote($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Gets the value of the SellerRefundNote property. - * - * @return string SellerRefundNote","public function isSetSellerRefundNote() - { - return !is_null($this->_fields['SellerRefundNote']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the SellerRefundNote property. - * - * @param string SellerRefundNote - * @return this instance","public function getSoftDescriptor() - { - return $this->_fields['SoftDescriptor']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Sets the value of the SellerRefundNote and returns this instance - * - * @param string $value SellerRefundNote - * @return OffAmazonPaymentsService_Model_RefundRequest instance","public function setSoftDescriptor($value) - { - $this->_fields['SoftDescriptor']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Checks if SellerRefundNote is set - * - * @return bool true if SellerRefundNote is set","public function withSoftDescriptor($value) - { - $this->setSoftDescriptor($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundRequest,"* Gets the value of the SoftDescriptor property. - * - * @return string SoftDescriptor","public function isSetSoftDescriptor() - { - return !is_null($this->_fields['SoftDescriptor']['FieldValue']); - }" -OffAmazonPaymentsService_Model_RefundResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'RefundResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_RefundResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_RefundResponse,* @see OffAmazonPaymentsService_Model,"public function getRefundResult() - { - return $this->_fields['RefundResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundResponse,"* OffAmazonPaymentsService_Model_RefundResponse - * - * Properties: - * ","public function setRefundResult($value) - { - $this->_fields['RefundResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_RefundResponse,"* Construct new OffAmazonPaymentsService_Model_RefundResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withRefundResult($value) - { - $this->setRefundResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundResponse,"* Construct OffAmazonPaymentsService_Model_RefundResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_RefundResponse","public function isSetRefundResult() - { - return !is_null($this->_fields['RefundResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_RefundResponse,"* Gets the value of the RefundResult. - * - * @return OffAmazonPaymentsService_Model_RefundResult RefundResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundResponse,"* Sets the value of the RefundResult. - * - * @param RefundResult RefundResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_RefundResponse,"* Sets the value of the RefundResult and returns this instance - * - * @param RefundResult $value RefundResult - * @return OffAmazonPaymentsService_Model_RefundResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundResponse,"* Checks if RefundResult is set - * - * @return bool true if RefundResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_RefundResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_RefundResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_RefundResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_RefundResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_RefundResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'RefundDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_RefundDetails'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_RefundResult,* @see OffAmazonPaymentsService_Model,"public function getRefundDetails() - { - return $this->_fields['RefundDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_RefundResult,"* OffAmazonPaymentsService_Model_RefundResult - * - * Properties: - * ","public function setRefundDetails($value) - { - $this->_fields['RefundDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_RefundResult,"* Construct new OffAmazonPaymentsService_Model_RefundResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withRefundDetails($value) - { - $this->setRefundDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_RefundResult,"* Gets the value of the RefundDetails. - * - * @return OffAmazonPaymentsService_Model_RefundDetails RefundDetails","public function isSetRefundDetails() - { - return !is_null($this->_fields['RefundDetails']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_ResponseHeaderMetadata,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($requestId = null, $responseContext = null, $timestamp = null) { - $this->metadata[self::REQUEST_ID] = $requestId; - $this->metadata[self::RESPONSE_CONTEXT] = $responseContext; - $this->metadata[self::TIMESTAMP] = $timestamp; - }" -OffAmazonPaymentsService_Model_ResponseMetadata,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'RequestId' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ResponseMetadata,* @see OffAmazonPaymentsService_Model,"public function getRequestId() - { - return $this->_fields['RequestId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ResponseMetadata,"* OffAmazonPaymentsService_Model_ResponseMetadata - * - * Properties: - * ","public function setRequestId($value) - { - $this->_fields['RequestId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ResponseMetadata,"* Construct new OffAmazonPaymentsService_Model_ResponseMetadata - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withRequestId($value) - { - $this->setRequestId($value); - return $this; - }" -OffAmazonPaymentsService_Model_ResponseMetadata,"* Gets the value of the RequestId property. - * - * @return string RequestId","public function isSetRequestId() - { - return !is_null($this->_fields['RequestId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'SellerBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'StoreName' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'CustomInformation' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes - * - * Properties: - * ","public function getSellerBillingAgreementId () - { - return $this->_fields['SellerBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Construct new OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setSellerBillingAgreementId ($value) - { - $this->_fields['SellerBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Gets the value of the SellerBillingAgreementId property. - * - * @return string SellerBillingAgreementId","public function withSellerBillingAgreementId ($value) - { - $this->setSellerBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Sets the value of the SellerBillingAgreementId property. - * - * @param string SellerBillingAgreementId - * @return this instance","public function isSetSellerBillingAgreementId () - { - return ! is_null($this->_fields['SellerBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Sets the value of the SellerBillingAgreementId and returns this instance - * - * @param string $value SellerBillingAgreementId - * @return OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes instance","public function getStoreName () - { - return $this->_fields['StoreName']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Checks if SellerBillingAgreementId is set - * - * @return bool true if SellerBillingAgreementId is set","public function setStoreName ($value) - { - $this->_fields['StoreName']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Gets the value of the StoreName property. - * - * @return string StoreName","public function withStoreName ($value) - { - $this->setStoreName($value); - return $this; - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Sets the value of the StoreName property. - * - * @param string StoreName - * @return this instance","public function isSetStoreName () - { - return ! is_null($this->_fields['StoreName']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Sets the value of the StoreName and returns this instance - * - * @param string $value StoreName - * @return OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes instance","public function getCustomInformation () - { - return $this->_fields['CustomInformation']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Checks if StoreName is set - * - * @return bool true if StoreName is set","public function setCustomInformation ($value) - { - $this->_fields['CustomInformation']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Gets the value of the CustomInformation property. - * - * @return string CustomInformation","public function withCustomInformation ($value) - { - $this->setCustomInformation($value); - return $this; - }" -OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes,"* Sets the value of the CustomInformation property. - * - * @param string CustomInformation - * @return this instance","public function isSetCustomInformation () - { - return ! is_null($this->_fields['CustomInformation']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerOrderId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'StoreName' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'OrderItemCategories' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderItemCategories'), - - 'CustomInformation' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,* @see OffAmazonPaymentsService_Model,"public function getSellerOrderId() - { - return $this->_fields['SellerOrderId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* OffAmazonPaymentsService_Model_SellerOrderAttributes - * - * Properties: - * ","public function setSellerOrderId($value) - { - $this->_fields['SellerOrderId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Construct new OffAmazonPaymentsService_Model_SellerOrderAttributes - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerOrderId($value) - { - $this->setSellerOrderId($value); - return $this; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Gets the value of the SellerOrderId property. - * - * @return string SellerOrderId","public function isSetSellerOrderId() - { - return !is_null($this->_fields['SellerOrderId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Sets the value of the SellerOrderId property. - * - * @param string SellerOrderId - * @return this instance","public function getStoreName() - { - return $this->_fields['StoreName']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Sets the value of the SellerOrderId and returns this instance - * - * @param string $value SellerOrderId - * @return OffAmazonPaymentsService_Model_SellerOrderAttributes instance","public function setStoreName($value) - { - $this->_fields['StoreName']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Checks if SellerOrderId is set - * - * @return bool true if SellerOrderId is set","public function withStoreName($value) - { - $this->setStoreName($value); - return $this; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Gets the value of the StoreName property. - * - * @return string StoreName","public function isSetStoreName() - { - return !is_null($this->_fields['StoreName']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Sets the value of the StoreName property. - * - * @param string StoreName - * @return this instance","public function getOrderItemCategories() - { - return $this->_fields['OrderItemCategories']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Sets the value of the StoreName and returns this instance - * - * @param string $value StoreName - * @return OffAmazonPaymentsService_Model_SellerOrderAttributes instance","public function setOrderItemCategories($value) - { - $this->_fields['OrderItemCategories']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Checks if StoreName is set - * - * @return bool true if StoreName is set","public function withOrderItemCategories($value) - { - $this->setOrderItemCategories($value); - return $this; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Gets the value of the OrderItemCategories. - * - * @return OrderItemCategories OrderItemCategories","public function isSetOrderItemCategories() - { - return !is_null($this->_fields['OrderItemCategories']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Sets the value of the OrderItemCategories. - * - * @param OrderItemCategories OrderItemCategories - * @return void","public function getCustomInformation() - { - return $this->_fields['CustomInformation']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Sets the value of the OrderItemCategories and returns this instance - * - * @param OrderItemCategories $value OrderItemCategories - * @return OffAmazonPaymentsService_Model_SellerOrderAttributes instance","public function setCustomInformation($value) - { - $this->_fields['CustomInformation']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Checks if OrderItemCategories is set - * - * @return bool true if OrderItemCategories property is set","public function withCustomInformation($value) - { - $this->setCustomInformation($value); - return $this; - }" -OffAmazonPaymentsService_Model_SellerOrderAttributes,"* Gets the value of the CustomInformation property. - * - * @return string CustomInformation","public function isSetCustomInformation() - { - return !is_null($this->_fields['CustomInformation']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'SellerId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'AmazonBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'BillingAgreementAttributes' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementAttributes' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest - * - * Properties: - * ","public function getSellerId () - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Construct new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setSellerId ($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function withSellerId ($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function isSetSellerId () - { - return ! is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest instance","public function getAmazonBillingAgreementId () - { - return $this->_fields['AmazonBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function setAmazonBillingAgreementId ($value) - { - $this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Gets the value of the AmazonBillingAgreementId property. - * - * @return string AmazonBillingAgreementId","public function withAmazonBillingAgreementId ($value) - { - $this->setAmazonBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Sets the value of the AmazonBillingAgreementId property. - * - * @param string AmazonBillingAgreementId - * @return this instance","public function isSetAmazonBillingAgreementId () - { - return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Sets the value of the AmazonBillingAgreementId and returns this instance - * - * @param string $value AmazonBillingAgreementId - * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest instance","public function getBillingAgreementAttributes () - { - return $this->_fields['BillingAgreementAttributes']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Checks if AmazonBillingAgreementId is set - * - * @return bool true if AmazonBillingAgreementId is set","public function setBillingAgreementAttributes ($value) - { - $this->_fields['BillingAgreementAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Gets the value of the BillingAgreementAttributes. - * - * @return BillingAgreementAttributes BillingAgreementAttributes","public function withBillingAgreementAttributes ($value) - { - $this->setBillingAgreementAttributes($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest,"* Sets the value of the BillingAgreementAttributes. - * - * @param BillingAgreementAttributes BillingAgreementAttributes - * @return void","public function isSetBillingAgreementAttributes () - { - return ! is_null($this->_fields['BillingAgreementAttributes']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'SetBillingAgreementDetailsResult' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult' - ), - - 'ResponseMetadata' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse - * - * Properties: - * ","public function getSetBillingAgreementDetailsResult () - { - return $this->_fields['SetBillingAgreementDetailsResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Construct new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setSetBillingAgreementDetailsResult ($value) - { - $this->_fields['SetBillingAgreementDetailsResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Construct OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse","public function withSetBillingAgreementDetailsResult ($value) - { - $this->setSetBillingAgreementDetailsResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Gets the value of the SetBillingAgreementDetailsResult. - * - * @return SetBillingAgreementDetailsResult SetBillingAgreementDetailsResult","public function isSetSetBillingAgreementDetailsResult () - { - return ! is_null($this->_fields['SetBillingAgreementDetailsResult']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Sets the value of the SetBillingAgreementDetailsResult. - * - * @param SetBillingAgreementDetailsResult SetBillingAgreementDetailsResult - * @return void","public function getResponseMetadata () - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Sets the value of the SetBillingAgreementDetailsResult and returns this instance - * - * @param SetBillingAgreementDetailsResult $value SetBillingAgreementDetailsResult - * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse instance","public function setResponseMetadata ($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Checks if SetBillingAgreementDetailsResult is set - * - * @return bool true if SetBillingAgreementDetailsResult property is set","public function withResponseMetadata ($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function isSetResponseMetadata () - { - return ! is_null($this->_fields['ResponseMetadata']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function toXML () - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse instance","public function getResponseHeaderMetadata () - { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse,"* Checks if ResponseMetadata is set - * - * @return bool true if ResponseMetadata property is set","public function setResponseHeaderMetadata ($responseHeaderMetadata) - { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'BillingAgreementDetails' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementDetails' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,"* OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult - * - * Properties: - * ","public function getBillingAgreementDetails () - { - return $this->_fields['BillingAgreementDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,"* Construct new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setBillingAgreementDetails ($value) - { - $this->_fields['BillingAgreementDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,"* Gets the value of the BillingAgreementDetails. - * - * @return BillingAgreementDetails BillingAgreementDetails","public function withBillingAgreementDetails ($value) - { - $this->setBillingAgreementDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResult,"* Sets the value of the BillingAgreementDetails. - * - * @param BillingAgreementDetails BillingAgreementDetails - * @return void","public function isSetBillingAgreementDetails () - { - return ! is_null($this->_fields['BillingAgreementDetails']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'SellerId' => array('FieldValue' => null, 'FieldType' => 'string'), - 'AmazonOrderReferenceId' => array('FieldValue' => null, 'FieldType' => 'string'), - - 'OrderReferenceAttributes' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceAttributes'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,* @see OffAmazonPaymentsService_Model,"public function getSellerId() - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest - * - * Properties: - * ","public function setSellerId($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Construct new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSellerId($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function isSetSellerId() - { - return !is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function getAmazonOrderReferenceId() - { - return $this->_fields['AmazonOrderReferenceId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Sets the value of the SellerId and returns this instance - * - * @param string $value SellerId - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest instance","public function setAmazonOrderReferenceId($value) - { - $this->_fields['AmazonOrderReferenceId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Checks if SellerId is set - * - * @return bool true if SellerId is set","public function withAmazonOrderReferenceId($value) - { - $this->setAmazonOrderReferenceId($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Gets the value of the AmazonOrderReferenceId property. - * - * @return string AmazonOrderReferenceId","public function isSetAmazonOrderReferenceId() - { - return !is_null($this->_fields['AmazonOrderReferenceId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Sets the value of the AmazonOrderReferenceId property. - * - * @param string AmazonOrderReferenceId - * @return this instance","public function getOrderReferenceAttributes() - { - return $this->_fields['OrderReferenceAttributes']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Sets the value of the AmazonOrderReferenceId and returns this instance - * - * @param string $value AmazonOrderReferenceId - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest instance","public function setOrderReferenceAttributes($value) - { - $this->_fields['OrderReferenceAttributes']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Checks if AmazonOrderReferenceId is set - * - * @return bool true if AmazonOrderReferenceId is set","public function withOrderReferenceAttributes($value) - { - $this->setOrderReferenceAttributes($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest,"* Gets the value of the OrderReferenceAttributes. - * - * @return OffAmazonPaymentsService_Model_OrderReferenceAttributes OrderReferenceAttributes","public function isSetOrderReferenceAttributes() - { - return !is_null($this->_fields['OrderReferenceAttributes']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'SetOrderReferenceDetailsResult' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult'), - - - 'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,* @see OffAmazonPaymentsService_Model,"public function getSetOrderReferenceDetailsResult() - { - return $this->_fields['SetOrderReferenceDetailsResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse - * - * Properties: - * ","public function setSetOrderReferenceDetailsResult($value) - { - $this->_fields['SetOrderReferenceDetailsResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* Construct new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withSetOrderReferenceDetailsResult($value) - { - $this->setSetOrderReferenceDetailsResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* Construct OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse","public function isSetSetOrderReferenceDetailsResult() - { - return !is_null($this->_fields['SetOrderReferenceDetailsResult']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* Gets the value of the SetOrderReferenceDetailsResult. - * - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult SetOrderReferenceDetailsResult","public function getResponseMetadata() - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* Sets the value of the SetOrderReferenceDetailsResult. - * - * @param SetOrderReferenceDetailsResult SetOrderReferenceDetailsResult - * @return void","public function setResponseMetadata($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* Sets the value of the SetOrderReferenceDetailsResult and returns this instance - * - * @param SetOrderReferenceDetailsResult $value SetOrderReferenceDetailsResult - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse instance","public function withResponseMetadata($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* Checks if SetOrderReferenceDetailsResult is set - * - * @return bool true if SetOrderReferenceDetailsResult property is set","public function isSetResponseMetadata() - { - return !is_null($this->_fields['ResponseMetadata']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function toXML() - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function getResponseHeaderMetadata() { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse instance","public function setResponseHeaderMetadata($responseHeaderMetadata) { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - - 'OrderReferenceDetails' => array('FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsService_Model_OrderReferenceDetails'), - - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,* @see OffAmazonPaymentsService_Model,"public function getOrderReferenceDetails() - { - return $this->_fields['OrderReferenceDetails']['FieldValue']; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,"* OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult - * - * Properties: - * ","public function setOrderReferenceDetails($value) - { - $this->_fields['OrderReferenceDetails']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,"* Construct new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withOrderReferenceDetails($value) - { - $this->setOrderReferenceDetails($value); - return $this; - }" -OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResult,"* Gets the value of the OrderReferenceDetails. - * - * @return OrderReferenceDetails OrderReferenceDetails","public function isSetOrderReferenceDetails() - { - return !is_null($this->_fields['OrderReferenceDetails']['FieldValue']); - - }" -OffAmazonPaymentsService_Model_Status,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct($data = null) - { - $this->_fields = array ( - 'State' => array('FieldValue' => null, 'FieldType' => 'string'), - 'LastUpdateTimestamp' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ReasonCode' => array('FieldValue' => null, 'FieldType' => 'string'), - 'ReasonDescription' => array('FieldValue' => null, 'FieldType' => 'string'), - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_Status,* @see OffAmazonPaymentsService_Model,"public function getState() - { - return $this->_fields['State']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Status,"* OffAmazonPaymentsService_Model_Status - * - * Properties: - * ","public function setState($value) - { - $this->_fields['State']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Status,"* Construct new OffAmazonPaymentsService_Model_Status - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function withState($value) - { - $this->setState($value); - return $this; - }" -OffAmazonPaymentsService_Model_Status,"* Gets the value of the State property. - * - * @return string State","public function isSetState() - { - return !is_null($this->_fields['State']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Status,"* Sets the value of the State property. - * - * @param string State - * @return this instance","public function getLastUpdateTimestamp() - { - return $this->_fields['LastUpdateTimestamp']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Status,"* Sets the value of the State and returns this instance - * - * @param string $value State - * @return OffAmazonPaymentsService_Model_Status instance","public function setLastUpdateTimestamp($value) - { - $this->_fields['LastUpdateTimestamp']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Status,"* Checks if State is set - * - * @return bool true if State is set","public function withLastUpdateTimestamp($value) - { - $this->setLastUpdateTimestamp($value); - return $this; - }" -OffAmazonPaymentsService_Model_Status,"* Gets the value of the LastUpdateTimestamp property. - * - * @return string LastUpdateTimestamp","public function isSetLastUpdateTimestamp() - { - return !is_null($this->_fields['LastUpdateTimestamp']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Status,"* Sets the value of the LastUpdateTimestamp property. - * - * @param string LastUpdateTimestamp - * @return this instance","public function getReasonCode() - { - return $this->_fields['ReasonCode']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Status,"* Sets the value of the LastUpdateTimestamp and returns this instance - * - * @param string $value LastUpdateTimestamp - * @return OffAmazonPaymentsService_Model_Status instance","public function setReasonCode($value) - { - $this->_fields['ReasonCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Status,"* Checks if LastUpdateTimestamp is set - * - * @return bool true if LastUpdateTimestamp is set","public function withReasonCode($value) - { - $this->setReasonCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_Status,"* Gets the value of the ReasonCode property. - * - * @return string ReasonCode","public function isSetReasonCode() - { - return !is_null($this->_fields['ReasonCode']['FieldValue']); - }" -OffAmazonPaymentsService_Model_Status,"* Sets the value of the ReasonCode property. - * - * @param string ReasonCode - * @return this instance","public function getReasonDescription() - { - return $this->_fields['ReasonDescription']['FieldValue']; - }" -OffAmazonPaymentsService_Model_Status,"* Sets the value of the ReasonCode and returns this instance - * - * @param string $value ReasonCode - * @return OffAmazonPaymentsService_Model_Status instance","public function setReasonDescription($value) - { - $this->_fields['ReasonDescription']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_Status,"* Checks if ReasonCode is set - * - * @return bool true if ReasonCode is set","public function withReasonDescription($value) - { - $this->setReasonDescription($value); - return $this; - }" -OffAmazonPaymentsService_Model_Status,"* Gets the value of the ReasonDescription property. - * - * @return string ReasonDescription","public function isSetReasonDescription() - { - return !is_null($this->_fields['ReasonDescription']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'AmazonBillingAgreementId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'SellerId' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ) - ); - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,"* OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest - * - * Properties: - * ","public function getAmazonBillingAgreementId () - { - return $this->_fields['AmazonBillingAgreementId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,"* Construct new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setAmazonBillingAgreementId ($value) - { - $this->_fields['AmazonBillingAgreementId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,"* Gets the value of the AmazonBillingAgreementId property. - * - * @return string AmazonBillingAgreementId","public function withAmazonBillingAgreementId ($value) - { - $this->setAmazonBillingAgreementId($value); - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,"* Sets the value of the AmazonBillingAgreementId property. - * - * @param string AmazonBillingAgreementId - * @return this instance","public function isSetAmazonBillingAgreementId () - { - return ! is_null($this->_fields['AmazonBillingAgreementId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,"* Sets the value of the AmazonBillingAgreementId and returns this instance - * - * @param string $value AmazonBillingAgreementId - * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest instance","public function getSellerId () - { - return $this->_fields['SellerId']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,"* Checks if AmazonBillingAgreementId is set - * - * @return bool true if AmazonBillingAgreementId is set","public function setSellerId ($value) - { - $this->_fields['SellerId']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,"* Gets the value of the SellerId property. - * - * @return string SellerId","public function withSellerId ($value) - { - $this->setSellerId($value); - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest,"* Sets the value of the SellerId property. - * - * @param string SellerId - * @return this instance","public function isSetSellerId () - { - return ! is_null($this->_fields['SellerId']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - - 'ValidateBillingAgreementResult' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_ValidateBillingAgreementResult' - ), - - 'ResponseMetadata' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_ResponseMetadata' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse - * - * Properties: - * ","public function getValidateBillingAgreementResult () - { - return $this->_fields['ValidateBillingAgreementResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Construct new OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setValidateBillingAgreementResult ($value) - { - $this->_fields['ValidateBillingAgreementResult']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Construct OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse from XML string - * - * @param string $xml XML string to construct from - * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse","public function withValidateBillingAgreementResult ($value) - { - $this->setValidateBillingAgreementResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Gets the value of the ValidateBillingAgreementResult. - * - * @return ValidateBillingAgreementResult ValidateBillingAgreementResult","public function isSetValidateBillingAgreementResult () - { - return ! is_null($this->_fields['ValidateBillingAgreementResult']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Sets the value of the ValidateBillingAgreementResult. - * - * @param ValidateBillingAgreementResult ValidateBillingAgreementResult - * @return void","public function getResponseMetadata () - { - return $this->_fields['ResponseMetadata']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Sets the value of the ValidateBillingAgreementResult and returns this instance - * - * @param ValidateBillingAgreementResult $value ValidateBillingAgreementResult - * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse instance","public function setResponseMetadata ($value) - { - $this->_fields['ResponseMetadata']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Checks if ValidateBillingAgreementResult is set - * - * @return bool true if ValidateBillingAgreementResult property is set","public function withResponseMetadata ($value) - { - $this->setResponseMetadata($value); - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Gets the value of the ResponseMetadata. - * - * @return ResponseMetadata ResponseMetadata","public function isSetResponseMetadata () - { - return ! is_null($this->_fields['ResponseMetadata']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Sets the value of the ResponseMetadata. - * - * @param ResponseMetadata ResponseMetadata - * @return void","public function toXML () - { - $xml = """"; - $xml .= """"; - $xml .= $this->_toXMLFragment(); - $xml .= """"; - return $xml; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Sets the value of the ResponseMetadata and returns this instance - * - * @param ResponseMetadata $value ResponseMetadata - * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse instance","public function getResponseHeaderMetadata () - { - return $this->_responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse,"* Checks if ResponseMetadata is set - * - * @return bool true if ResponseMetadata property is set","public function setResponseHeaderMetadata ($responseHeaderMetadata) - { - return $this->_responseHeaderMetadata = $responseHeaderMetadata; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($data = null) - { - $this->_fields = array( - 'ValidationResult' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - 'FailureReasonCode' => array( - 'FieldValue' => null, - 'FieldType' => 'string' - ), - - 'BillingAgreementStatus' => array( - 'FieldValue' => null, - 'FieldType' => 'OffAmazonPaymentsService_Model_BillingAgreementStatus' - ) - ) - ; - parent::__construct($data); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* OffAmazonPaymentsService_Model_ValidateBillingAgreementResult - * - * Properties: - * ","public function getValidationResult () - { - return $this->_fields['ValidationResult']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Construct new OffAmazonPaymentsService_Model_ValidateBillingAgreementResult - * - * @param mixed $data DOMElement or Associative Array to construct from. - * - * Valid properties: - * ","public function setValidationResult ($value) - { - $this->_fields['ValidationResult']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Gets the value of the ValidationResult property. - * - * @return string ValidationResult","public function withValidationResult ($value) - { - $this->setValidationResult($value); - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Sets the value of the ValidationResult property. - * - * @param string ValidationResult - * @return this instance","public function isSetValidationResult () - { - return ! is_null($this->_fields['ValidationResult']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Sets the value of the ValidationResult and returns this instance - * - * @param string $value ValidationResult - * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResult instance","public function getFailureReasonCode () - { - return $this->_fields['FailureReasonCode']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Checks if ValidationResult is set - * - * @return bool true if ValidationResult is set","public function setFailureReasonCode ($value) - { - $this->_fields['FailureReasonCode']['FieldValue'] = $value; - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Gets the value of the FailureReasonCode property. - * - * @return string FailureReasonCode","public function withFailureReasonCode ($value) - { - $this->setFailureReasonCode($value); - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Sets the value of the FailureReasonCode property. - * - * @param string FailureReasonCode - * @return this instance","public function isSetFailureReasonCode () - { - return ! is_null($this->_fields['FailureReasonCode']['FieldValue']); - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Sets the value of the FailureReasonCode and returns this instance - * - * @param string $value FailureReasonCode - * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResult instance","public function getBillingAgreementStatus () - { - return $this->_fields['BillingAgreementStatus']['FieldValue']; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Checks if FailureReasonCode is set - * - * @return bool true if FailureReasonCode is set","public function setBillingAgreementStatus ($value) - { - $this->_fields['BillingAgreementStatus']['FieldValue'] = $value; - return; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Gets the value of the BillingAgreementStatus. - * - * @return BillingAgreementStatus BillingAgreementStatus","public function withBillingAgreementStatus ($value) - { - $this->setBillingAgreementStatus($value); - return $this; - }" -OffAmazonPaymentsService_Model_ValidateBillingAgreementResult,"* Sets the value of the BillingAgreementStatus. - * - * @param BillingAgreementStatus BillingAgreementStatus - * @return void","public function isSetBillingAgreementStatus () - { - return ! is_null($this->_fields['BillingAgreementStatus']['FieldValue']); - }" -AddressConsentSample,"* AddressConsentSample shows how to use an - * access token in order to return additional information about the buyer - * attached to a payment contract. - * - * This example is for US based customers only. - * - * Note that the token requires needs to be decoded before it can be passed - * into the service call - * - * The sample is run by passing in a draft order reference and the access token - * assocaited with this order reference object..","public function __construct($service, $amazonOrderReferenceId) - { - $this->_service = $service; - $this->_amazonOrderReferenceId = $amazonOrderReferenceId; - $this->_sellerId = $this->_service->getMerchantValues()->getMerchantId(); - }" -AddressConsentSample,"* Create a new instance of the Address consent sample - * - * @param OffAmazonPaymentsService_Client $service instance of the service - * client - * @param string $amazonOrderReferenceId an order reference object in - * draft state to use in - * the example - * - * @return new PayWithAmazonAddressConsentSample","public function validateOrderReferenceIsInACorrectState($getOrderReferenceDetailsResponse) - { - validateOrderReferenceIsInACorrectState( - $getOrderReferenceDetailsResponse->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails(), - ""DRAFT"" - ); - }" -AddressConsentSample,"* Validate that the order reference is in the draft state - * - * @param OffAmazonPayments_Model_GetOrderReferenceDetailsResponse in an unverified state - * - * @return void - * @throws ErrorException if the state does not match the expected state","public function getOrderReferenceDetails($addressConsentToken = null) - { - $getOrderReferenceDetailsRequest = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest(); - $getOrderReferenceDetailsRequest->setSellerId($this->_sellerId); - $getOrderReferenceDetailsRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - - if (is_null($addressConsentToken) == FALSE) { - $decodedToken = urldecode($addressConsentToken); - $getOrderReferenceDetailsRequest->setAddressConsentToken($decodedToken); - }" -AutomaticPaymentsSimpleCheckoutExample,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($service, $amazonBillingAgreementId) - { - $this->_service = $service; - - $this->_amazonBillingAgreementId = $amazonBillingAgreementId; - - $this->_sellerId = $this->_service->getMerchantValues()->getMerchantId(); - - $this->_shippingAndTaxCostHelper = new ShippingAndTaxCostHelper(); - }" -AutomaticPaymentsSimpleCheckoutExample,"* AutomaticPaymentsSimpleCheckoutExample includes the logic required to capture - * an order and perform all actions to capture the order amount fromthe buyer.","public function getBillingAgreementDetails () - { - $getBillingAgreementDetailsRequest = new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest(); - $getBillingAgreementDetailsRequest->setSellerId($this->_sellerId); - $getBillingAgreementDetailsRequest->setAmazonBillingAgreementId( - $this->_amazonBillingAgreementId); - - return $this->_service->getBillingAgreementDetails($getBillingAgreementDetailsRequest); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Create a new instance of the automatic payment simple checkout example - * case - * - * @param OffAmazonPaymentsService_Client $service - * instance of the service client - * @param string $amazonBillingAgreementId - * an billing agreement object in draft state - * - * @return new AutomaticPaymentsSimpleCheckoutExample","public function calculatePaymentAmountBasedOnBuyerDetails ($BillingAgreementDetails, - $orderAmountPreTaxAndShipping, $shippingType) - { - return $this->_shippingAndTaxCostHelper->calculateTotalAmount($BillingAgreementDetails, - $orderAmountPreTaxAndShipping, $shippingType); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Use the billing agreement object to query the automatic payment - * information, including the current physical delivery address as selected - * by the buyer - * - * @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse - * service response","public function addSellerInformationToBillingAgreement () - { - $sellerBillingAgreementAttributes = new OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes(); - $sellerBillingAgreementAttributes->setSellerBillingAgreementId( - $this->_amazonBillingAgreementId); - $sellerBillingAgreementAttributes->setStoreName(""Your store name here""); - $sellerBillingAgreementAttributes->setCustomInformation( - ""Additional information you wish to include with this billing agreement.""); - - $billingAgreementAttributes = new OffAmazonPaymentsService_Model_BillingAgreementAttributes(); - $billingAgreementAttributes->setSellerNote( - ""Description of the billing agreement that is displayed to the buyer in the emails.""); - $billingAgreementAttributes->setSellerBillingAgreementAttributes( - $sellerBillingAgreementAttributes); - - $setBillingAgreementDetailsRequest = new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest(); - $setBillingAgreementDetailsRequest->setAmazonBillingAgreementId( - $this->_amazonBillingAgreementId); - $setBillingAgreementDetailsRequest->setSellerId($this->_sellerId); - $setBillingAgreementDetailsRequest->setBillingAgreementAttributes( - $billingAgreementAttributes); - return $this->_service->setBillingAgreementDetails($setBillingAgreementDetailsRequest); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Calculate the amount to charge the buyer for each payment, based on the - * buyer destination address - * - * Note that until the billing agreement is confirmed, the name & address - * fields will not be returned to the client. - * - * @param OffAmazonPaymentsService_Model_BillingAgreementDetails $BillingAgreementDetails - * response - * @param string $orderAmountPreTaxAndShipping - * order amount - * @param int $shippingType - * shipping type - * - * @return float total amount for the order, with shipping and tax included","public function confirmBillingAgreement () - { - $confirmBillingAgreementRequest = new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest(); - $confirmBillingAgreementRequest->setAmazonBillingAgreementId( - $this->_amazonBillingAgreementId); - $confirmBillingAgreementRequest->setSellerId($this->_sellerId); - - return $this->_service->confirmBillingAgreement($confirmBillingAgreementRequest); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Set seller specific information to the billing agreement details. - * - * @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse - * service response","public function validateBillingAgreement () - { - $validateBillingAgreementRequest = new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest(); - $validateBillingAgreementRequest->setAmazonBillingAgreementId( - $this->_amazonBillingAgreementId); - $validateBillingAgreementRequest->setSellerId($this->_sellerId); - - return $this->_service->validateBillingAgreement($validateBillingAgreementRequest); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Confirm the billing agreement information, allowing for authorizations - * and captures to be created - * - * @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse - * service response","public function authorizePaymentAmount ($authorizationAmount, $authorizationReferenceId) - { - $authorizeOnBillingAgreementRequest = $this->_createAuthorizeOnBillingAgreementRequest( - $authorizationAmount, $authorizationReferenceId, false); - return $this->_service->authorizeOnBillingAgreement($authorizeOnBillingAgreementRequest); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Check that the billing agreement is in valid status and the selected payment - * method is also valid. - * - * @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse - * service response","public function authorizePaymentAmountWithCaptureNow ($authorizationAmount, - $authorizationReferenceId) - { - $authorizeOnBillingAgreementRequest = $this->_createAuthorizeOnBillingAgreementRequest( - $authorizationAmount, $authorizationReferenceId, true); - return $this->_service->authorizeOnBillingAgreement($authorizeOnBillingAgreementRequest); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Perform the authorize call on the billing agreement - * - * @param float $authorizationAmount - * amount to authorize from the buyer - * - * @param string $authorizationReferenceId - * seller provided authorization reference id - * - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse - * service response","public function waitUntilAuthorizationProcessingIsCompleted ($amazonAuthorizationId) - { - $getAuthorizationDetailsResponse = null; - do { - sleep(5); - $getAuthorizationDetailsResponse = $this->getAuthorizationDetails( - $amazonAuthorizationId); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Authorize on the billing agreement with auto capture - * - * @param float $authorizationAmount - * amount to authorize from the buyer - * - * @param string $authorizationReferenceId - * seller provided authorization reference id - * - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse - * service response","public function getAuthorizationDetails ($amazonAuthorizationReferenceId) - { - $getAuthorizationDetailsRequest = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); - $getAuthorizationDetailsRequest->setSellerId($this->_sellerId); - $getAuthorizationDetailsRequest->setAmazonAuthorizationId($amazonAuthorizationReferenceId); - - return $this->_service->getAuthorizationDetails($getAuthorizationDetailsRequest); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Create AuthorizeOnBillingAgreement request - * - * @param float $authorizationAmount - * @param string $authorizationReferenceId - * @param bool $CaptureNow - * - * @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest","public function captureOrderAmount ($captureAmount, $amazonAuthorizationId) - { - $captureRequest = new OffAmazonPaymentsService_Model_CaptureRequest(); - $captureRequest->setSellerId($this->_sellerId); - $captureRequest->setAmazonAuthorizationId($amazonAuthorizationId); - $captureRequest->setCaptureReferenceId($amazonAuthorizationId . ""-c01""); - $captureRequest->setCaptureAmount(new OffAmazonPaymentsService_Model_Price()); - $captureRequest->getCaptureAmount()->setAmount($captureAmount); - $captureRequest->getCaptureAmount()->setCurrencyCode( - $this->_service->getMerchantValues() - ->getCurrency()); - - return $this->_service->capture($captureRequest); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Poll the API for the status of the Authorization Request, and continue - * once the status has been updated. - * WARNING: This is not the way to integrate for production systems, - * instead merchants should use IPN to receive a callback once the - * processing has been completed. - * Note that Amazon reserves the right to throttle requests that - * ignore this advice and poll for a response - * - * @param string $amazonAuthorizationReferenceId - * authorization transaction to query - * - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse - * service response","public function getCaptureDetails ($amazonCaptureId) - { - $captureDetailsRequest = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); - $captureDetailsRequest->setSellerId($this->_sellerId); - $captureDetailsRequest->setAmazonCaptureId($amazonCaptureId); - - return $this->_service->getCaptureDetails($captureDetailsRequest); - }" -AutomaticPaymentsSimpleCheckoutExample,"* Perform the getAuthroizationDetails request for the order - * - * @param string $amazonAuthorizationReferenceId - * authorization transaction - * to query - * - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse - * service response","public function closeBillingAgreement () - { - $closeBillingAgreementRequest = new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest(); - $closeBillingAgreementRequest->setSellerId($this->_sellerId); - $closeBillingAgreementRequest->setAmazonBillingAgreementId($this->_amazonBillingAgreementId); - $closeBillingAgreementRequest->setClosureReason(""Automatic payment complete""); - - return $this->_service->closeBillingAgreement($closeBillingAgreementRequest); - }" -drives,"***************************************************************************** - * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License. - * *****************************************************************************","public function __construct ($argv) - { - if (count($argv) < 1) { - print ""Missing mandatory argument: "" . ""please provide an amazonBillingAgreementId""; - exit(0); - }" -drives,"* AutomaticPaymentsSimpleCheckoutExampleCLI class captures input from stdin and - * prints to stdout, and drives the automatic payment simple checkout example","public function runSample () - { - // Calculate payment amount based on buyer selected shipping address - $paymentTotal = $this->_calculatePaymentAmountBasedOnBuyerDestinationAddress(); - - // Added custom information and seller note to the billing agreement - $this->_addSellerInformationToBillingAgreement(); - - /* - * Confirm billing agreement. The billing agreement has to be consented - * by buyer before you confirm the billing agreement. - */ - $this->_confirmBillingAgreement(); - - // Validate billing agreement (optional) - $this->_validateBillingAgreement(); - - // First payment - $amazonAuthorizationId1 = $this->_authorizePaymentAmount($paymentTotal, - $this->_amazonBillingAgreementId . ""-A01""); - $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId1); - $this->_captureOrderAmount($paymentTotal, $amazonAuthorizationId1); - - // Second payment with capture now - $this->_authorizePaymentAmountWithCaptureNow($paymentTotal, - $this->_amazonBillingAgreementId . ""-A02""); - - // More payments here ... - - /* - * Confirm the billing agreement again if the buyer changes the shipping - * address or payments method through widgets. For details on how to render - * widgets for existing billing agreements, please see integration guide - * for details. - */ - $this->_confirmBillingAgreement(); - - // Validate billing agreement (optional) - $this->_validateBillingAgreement(); - - // Another payment here - $this->_authorizePaymentAmountWithCaptureNow($paymentTotal, - $this->_amazonBillingAgreementId . ""-A03""); - - // More payments here ... - - // Close the billing agreement when this automatic payment is no longer - // needed - $this->_closeBillingAgreement(); - - print ""Automatic payment simple checkout example completed"" . PHP_EOL; - }" -CancellationExample,"* Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License.","public function __construct($service, $amazonOrderReferenceId, $orderTotalAmount) - { - $this->_service = $service; - $this->_amazonOrderReferenceId = $amazonOrderReferenceId; - - /* - * Setup shared identifiers for the series of transaction requests - */ - $this->_authorizationReferenceId - = str_replace(""-"", """", $this->_amazonOrderReferenceId) . ""a01""; - - $this->_sellerId - = $this->_service->getMerchantValues()->getMerchantId(); - - $this->_orderTotalAmount = $orderTotalAmount; - $this->_currencyCode = $service->getMerchantValues()->getCurrency(); - }" -CancellationExample,"* CancellationExample includes the logic - * requiere to cancel an order with open - * authorizations - *","public function setupOrderReference() - { - $orderTotal = new OffAmazonPaymentsService_Model_OrderTotal(); - $orderTotal->setCurrencyCode($this->_currencyCode); - $orderTotal->setAmount($this->_orderTotalAmount); - - $setOrderReferenceDetailsRequest - = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest(); - $setOrderReferenceDetailsRequest->setSellerId($this->_sellerId); - $setOrderReferenceDetailsRequest - ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $setOrderReferenceDetailsRequest - ->setOrderReferenceAttributes( - new OffAmazonPaymentsService_Model_OrderReferenceAttributes() - ); - $setOrderReferenceDetailsRequest - ->getOrderReferenceAttributes()->setOrderTotal($orderTotal); - - return $this->_service->setOrderReferenceDetails( - $setOrderReferenceDetailsRequest - ); - }" -CancellationExample,"* Create a new instance of the simple checkout example - * case - * - * @param OffAmazonPaymentsService_Client $service instance of the - * service client - * @param string $amazonOrderReferenceId an order reference - * object in draft - * state to use in the example - * @param string $orderTotalAmount amount to authorize - * from the buyer - * - * @return new CancellationExample","public function confirmOrderReference() - { - $confirmOrderReferenceRequest - = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest(); - $confirmOrderReferenceRequest - ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $confirmOrderReferenceRequest->setSellerId($this->_sellerId); - - return $this->_service->confirmOrderReference($confirmOrderReferenceRequest); - }" -CancellationExample,"* Add information to the payment contract so that it can be confirmed - * in a later step - * Simulates a merchant adding the order details to the payment contract - * - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse - * response","public function performAuthorization() - { - $authorizationAmountPrice = new OffAmazonPaymentsService_Model_Price(); - $authorizationAmountPrice->setCurrencyCode($this->_currencyCode); - $authorizationAmountPrice->setAmount($this->_orderTotalAmount); - - $authorizeRequest = new OffAmazonPaymentsService_Model_AuthorizeRequest(); - $authorizeRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $authorizeRequest->setSellerId($this->_sellerId); - $authorizeRequest->setAuthorizationReferenceId( - $this->_authorizationReferenceId - ); - $authorizeRequest->setAuthorizationAmount($authorizationAmountPrice); - - return $this->_service->authorize($authorizeRequest); - }" -CancellationExample,"* Confirm the order reference information, allowing for - * authorizations and captures to be created - * - * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse response","public function waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId) - { - $getAuthorizationDetailsResponse = null; - do { - sleep(5); - $getAuthorizationDetailsResponse - = $this->getAuthorizationDetails($amazonAuthorizationId); - }" -CancellationExample,"* Perform the authorize call for the order - * - * Cancel order reference can now be called at any point between a - * ConfirmOrderReference call and a cancelOrderReference call - * In this example we will call it following a single authorization for - * half of the order total - * - * @return OffAmazonPaymentsService_Model_AuthorizeResponse service response","public function getAuthorizationDetails($amazonAuthorizationReferenceId) - { - $getAuthorizationDetailsRequest - = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); - $getAuthorizationDetailsRequest - ->setSellerId($this->_sellerId); - $getAuthorizationDetailsRequest - ->setAmazonAuthorizationId($amazonAuthorizationReferenceId); - - return $this->_service->getAuthorizationDetails( - $getAuthorizationDetailsRequest - ); - }" -CancellationExample,"* Poll the API for the status of the Authorization Request, and continue - * once the status has been updated - * WARNING: This is not the way to integrate for production systems, - * instead merchants should use IPN to receive a callback once the - * processing has been completed. - * Note that Amazon reserves the right to throttle requests that - * ignore this advice and poll for a response - * - * @param string $amazonAuthorizationId authorization transaction to query - * - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse - * response","public function cancelOrderReference() - { - $cancelOrderReferenceRequest - = new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest(); - $cancelOrderReferenceRequest->setSellerId($this->_sellerId); - $cancelOrderReferenceRequest - ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - - return $this->_service->cancelOrderReference($cancelOrderReferenceRequest); - }" -CancellationExample,"* Perform the getAuthroizationDetails request for the order - * - * @param string $amazonAuthorizationReferenceId authorization transaction - * to query - * - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse - * response","public function getOrderReferenceDetails() - { - $getOrderReferenceDetailsRequest - = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest(); - $getOrderReferenceDetailsRequest - ->setSellerId($this->_sellerId); - $getOrderReferenceDetailsRequest - ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - - return $this->_service->getOrderReferenceDetails( - $getOrderReferenceDetailsRequest - ); - }" -drives,"***************************************************************************** -* Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved. -* Licensed under the Apache License, Version 2.0 (the ""License""); -* -* You may not use this file except in compliance with the License. -* You may obtain a copy of the License at: -* http://aws.amazon.com/apache2.0 -* This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR -* CONDITIONS OF ANY KIND, either express or implied. See the License -* for the -* specific language governing permissions and limitations under the -* License. -*****************************************************************************","public function __construct($argv) - { - if (count($argv) < 1) { - print ""Missing mandatory argument: "" . - ""please provide an amazonOrderReferenceId""; - exit(0); - }" -drives,"***************************************************************************** -* Cancellation command line example -* -* This class drives the cancellation example from a command line iterface -* See CancellationExample.php for more information -*****************************************************************************","public function runSample() - { - $this->_setupOrderReference(); - $this->_confirmOrderReference(); - $amazonAuthorizationId = $this->_performAuthorization(); - $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId); - $this->_cancelOrder(); - $this->_getOrderReferenceDetails(); - - print ""Cancellation completed"" . PHP_EOL; - }" -RefundExample,"* Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the ""License""); - * - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * http://aws.amazon.com/apache2.0 - * This file is distributed on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the - * specific language governing permissions and limitations under the - * License.","public function __construct($service, $amazonOrderReferenceId, $amazonCaptureId, $refundIdSuffix) - { - $this->_service = $service; - $this->_amazonOrderReferenceId = $amazonOrderReferenceId; - $this->_amazonCaptureId = $amazonCaptureId; - $this->_refundReferenceId - = str_replace(""-"", """", $amazonCaptureId) . ""c"" . $refundIdSuffix; - - $this->_sellerId - = $this->_service->getMerchantValues()->getMerchantId(); - }" -RefundExample,"* RefundExample includes the logic - * required to refund a capture, - * which transfers the funds from - * the merchant back to the buyer - *","public function getOrderReferenceDetails() - { - $getOrderReferenceDetailsRequest - = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest(); - $getOrderReferenceDetailsRequest->setSellerId($this->_sellerId); - $getOrderReferenceDetailsRequest->setAmazonOrderReferenceId( - $this->_amazonOrderReferenceId - ); - - return $this->_service->getOrderReferenceDetails( - $getOrderReferenceDetailsRequest - ); - }" -RefundExample,"* Create a new instance of the refund example case - * - * @param OffAmazonPaymentsService_Client $service instance of the service - * client - * @param string $amazonOrderReferenceId an order reference object in - * open or closed state to use in - * the example - * @param string $amazonCaptureId a completed capture that was - * performed on the order reference id - * @param string $refundIdSuffix suffixForTheRefundIdentifier - * - * @return new RefundExample","public function getCaptureDetailsRequest() - { - $getCaptureDetailsRequest - = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); - $getCaptureDetailsRequest->setSellerId($this->_sellerId); - $getCaptureDetailsRequest->setAmazonCaptureId($this->_amazonCaptureId); - - return $this->_service->getCaptureDetails($getCaptureDetailsRequest); - }" -RefundExample,"* Get the order reference details to find to the state - * of the order reference - * - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse response","public function refundToBuyer($refundAmount, $refundCurrency) - { - $refund = new OffAmazonPaymentsService_Model_Price(); - $refund->setCurrencyCode($refundCurrency); - $refund->setAmount($refundAmount); - - $refundRequest = new OffAmazonPaymentsService_Model_RefundRequest(); - $refundRequest->setSellerId($this->_sellerId); - $refundRequest->setAmazonCaptureId($this->_amazonCaptureId); - $refundRequest->setRefundReferenceId($this->_refundReferenceId); - $refundRequest->setRefundAmount($refund); - - return $this->_service->refund($refundRequest); - }" -RefundExample,"* Get the capture details to find out the - * maximum amount that can be refunded - * - * @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse response","public function waitUntilRefundProcessingIsCompleted($amazonRefundId) - { - $getRefundDetailsResponse = null; - do { - sleep(5); - $getRefundDetailsResponse - = $this->getRefundDetails($amazonRefundId); - }" -RefundExample,"* Perform the refund to transfer the amount from seller - * to buyer - * - * @param string $refundAmount amount to refund to the buyer - * @param string $refundCurrency currency of the refund - * - * @return void","public function getRefundDetails($amazonRefundId) - { - $getRefundDetailsRequest - = new OffAmazonPaymentsService_Model_GetRefundDetailsRequest(); - $getRefundDetailsRequest->setSellerId($this->_sellerId); - $getRefundDetailsRequest->setAmazonRefundId($amazonRefundId); - return $this->_service->getRefundDetails($getRefundDetailsRequest); - }" -RefundExample,"* Poll the API for the status of the Refund Request, and continue - * once the status has been updated - * WARNING: This is not the way to integrate for production systems, - * instead merchants should use IOPN to receive a callback once the - * processing has been completed. - * Note that Amazon reserves the right to throttle requests that - * ignore this advice and poll for a response - * - * @param string $amazonRefundId refund id to query status of - * - * @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse response","public function getCaptureDetails() - { - $captureDetailsRequest - = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); - $captureDetailsRequest->setSellerId($this->_sellerId); - $captureDetailsRequest->setAmazonCaptureId($this->_amazonCaptureId); - - return $this->_service->getCaptureDetails($captureDetailsRequest); - }" -captures,"* RefundExampleCLI class captures input from stdin and prints to stdout, - * and drives the refund example - *","public function __construct($argv) - { - if (count($argv) < 3) { - print ""Missing mandatory argument: "" . - ""please provide an amazonOrderReferenceId, a"" . - ""captureId that you want to refund, and"" . - ""a refund id suffix for the refund reference id""; - exit(0); - }" -captures,"* Create a new instance of the cli example and validate command line arguments - * - * @param array $argv arguments to the application passed from the command line","public function runSample() - { - $this->_getOrderReferenceDetails(); - $this->_getAmountToRefund(); - $refundAmount = $this->_getRefundAmount(); - $refundCurrency = $this->_getRefundCurrency(); - $amazonRefundReferenceId = $this->_refundToBuyer($refundAmount, $refundCurrency); - $this->_waitUntilRefundProcessingIsCompleted($amazonRefundReferenceId); - - print ""Refund completed"" . PHP_EOL; - }" -SimpleCheckoutExample,"* SimpleCheckoutExample includes the logic - * required to capture an order and perform - * all actions to capture the order amount from - * the buyer - *","public function __construct($service, $amazonOrderReferenceId) - { - - $this->_service = $service; - $this->_amazonOrderReferenceId = $amazonOrderReferenceId; - $this->_sellerId = $this->_service->getMerchantValues()->getMerchantId(); - $this->_shippingAndTaxCostHelper = new ShippingAndTaxCostHelper(); - - /* - * Setup shared identifiers for the series of transaction requests - */ - $this->_authorizationReferenceId - = str_replace(""-"", """", $this->_amazonOrderReferenceId) . ""A01""; - $this->_captureReferenceId = $this->_authorizationReferenceId . ""C01""; - - }" -SimpleCheckoutExample,"* Create a new instance of the simple checkout example - * case - * - * @param OffAmazonPaymentsService_Client $service instance of the service - * client - * @param string $amazonOrderReferenceId an order reference object in - * draft state to use in - * the example - * - * @return new SimpleCheckoutExample","public function getOrderReferenceDetails() - { - $getOrderReferenceDetailsRequest = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest(); - $getOrderReferenceDetailsRequest->setSellerId($this->_sellerId); - $getOrderReferenceDetailsRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - - return $this->_service->getOrderReferenceDetails($getOrderReferenceDetailsRequest); - }" -SimpleCheckoutExample,"* Use the order reference object to query the order information, including - * the current physical delivery address as selected by the buyer - * - * @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse service response","public function calculateOrderTotalBasedOnBuyerDetails($orderReferenceDetails, $orderAmountPreTaxAndShipping, $shippingType) - { - return $this->_shippingAndTaxCostHelper->calculateTotalAmount($orderReferenceDetails, - $orderAmountPreTaxAndShipping, $shippingType); - }" -SimpleCheckoutExample,"* Calculate the total amount to charge the buyer for this order, - * based on the buyer destination address - * - * Note that until the order is confirmed, the name & address fields will - * not be returned to the client - * - * @param OffAmazonPaymentsService_Model_OrderReferenceDetails $orderReferenceDetails response - * @param string $orderAmountPreTaxAndShipping order amount - * @param int $shippingType shipping type - * - * @return float total amount for the order, with shipping and tax included","public function addOrderTotalAndSellerInformationToOrder($orderTotal) - { - /* - * Setup request parameters and uncomment invoke to try out - * sample for Set Order Reference Details Action - */ - $setOrderReferenceDetailsRequest = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest(); - $setOrderReferenceDetailsRequest->setSellerId($this->_sellerId); - $setOrderReferenceDetailsRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $setOrderReferenceDetailsRequest->setOrderReferenceAttributes(new OffAmazonPaymentsService_Model_OrderReferenceAttributes()); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->setOrderTotal(new OffAmazonPaymentsService_Model_OrderTotal()); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getOrderTotal()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getOrderTotal()->setAmount($orderTotal); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->setSellerNote(""Red widgets""); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->setSellerOrderAttributes(new OffAmazonPaymentsService_Model_SellerOrderAttributes()); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getSellerOrderAttributes()->setSellerOrderId(""AD32333432212""); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getSellerOrderAttributes()->setStoreName(""Domestic site""); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getSellerOrderAttributes()->setCustomInformation(""Add blue stripe""); - - return $this->_service->setOrderReferenceDetails($setOrderReferenceDetailsRequest); - }" -SimpleCheckoutExample,"* Add order information by making the call to setOrderReferenceDetails with - * the total order amount, as well as notes describing the order information - * - * @param float $orderTotal total value of the order, incl shipping and tax - * - * @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse service response","public function confirmOrderReference() - { - $confirmOrderReferenceRequest - = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest(); - $confirmOrderReferenceRequest - ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $confirmOrderReferenceRequest->setSellerId($this->_sellerId); - - return $this->_service->confirmOrderReference($confirmOrderReferenceRequest); - }" -SimpleCheckoutExample,"* Confirm the order reference information, allowing for - * authorizations and captures to be created - * - * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse service response","public function authorizeOrderAmount($authorizationAmount) - { - $authorizeRequest = new OffAmazonPaymentsService_Model_AuthorizeRequest(); - $authorizeRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $authorizeRequest->setSellerId($this->_sellerId); - $authorizeRequest->setAuthorizationReferenceId($this->_authorizationReferenceId); - $authorizeRequest->setAuthorizationAmount(new OffAmazonPaymentsService_Model_Price()); - $authorizeRequest->getAuthorizationAmount()->setAmount($authorizationAmount); - $authorizeRequest->getAuthorizationAmount()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); - - return $this->_service->authorize($authorizeRequest); - }" -SimpleCheckoutExample,"* Perform the authorize call for the order - * - * @param float $authorizationAmount amount to authorize from the buyer - * - * @return OffAmazonPaymentsService_Model_AuthorizeResponse service response","public function waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId) - { - $getAuthorizationDetailsResponse = null; - do { - sleep(5); - $getAuthorizationDetailsResponse - = $this->getAuthorizationDetails($amazonAuthorizationId); - }" -SimpleCheckoutExample,"* Poll the API for the status of the Authorization Request, and continue - * once the status has been updated - * WARNING: This is not the way to integrate for production systems, - * instead merchants should use IPN to receive a callback once the - * processing has been completed. - * Note that Amazon reserves the right to throttle requests that - * ignore this advice and poll for a response - * - * @param string $amazonAuthorizationReferenceId authorization transaction to query - * - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse service response","public function getAuthorizationDetails($amazonAuthorizationReferenceId) - { - $getAuthorizationDetailsRequest = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); - $getAuthorizationDetailsRequest->setSellerId($this->_sellerId); - $getAuthorizationDetailsRequest->setAmazonAuthorizationId($amazonAuthorizationReferenceId); - - return $this->_service->getAuthorizationDetails($getAuthorizationDetailsRequest); - }" -SimpleCheckoutExample,"* Perform the getAuthroizationDetails request for the order - * - * @param string $amazonAuthorizationReferenceId authorization transaction - * to query - * - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse service response","public function captureOrderAmount($captureAmount, $amazonAuthorizationId) - { - $captureRequest = new OffAmazonPaymentsService_Model_CaptureRequest(); - $captureRequest->setSellerId($this->_sellerId); - $captureRequest->setAmazonAuthorizationId($amazonAuthorizationId); - $captureRequest->setCaptureReferenceId($this->_captureReferenceId); - $captureRequest->setCaptureAmount(new OffAmazonPaymentsService_Model_Price()); - $captureRequest->getCaptureAmount()->setAmount($captureAmount); - $captureRequest->getCaptureAmount()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); - - return $this->_service->capture($captureRequest); - }" -SimpleCheckoutExample,"* Perform the capture call for the order - * - * @param float $captureAmount amount to capture from the buyer - * @param string $amazonAuthorizationId auth id to perform the capture on - * - * @return OffAmazonPaymentsService_Model_CaptureResponse service response","public function getCaptureDetails($amazonCaptureId) - { - $captureDetailsRequest - = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); - $captureDetailsRequest->setSellerId($this->_sellerId); - $captureDetailsRequest->setAmazonCaptureId($amazonCaptureId); - - return $this->_service->getCaptureDetails($captureDetailsRequest); - }" -SimpleCheckoutExample,"* Perform the get capture details call for the order - * - * @param string $amazonCaptureId capture it to get details for - * - * @return OffAmazonPaymentsService_Model_CaptureResponse service response","public function closeOrderReference() - { - $closeOrderReferenceRequest = new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest(); - $closeOrderReferenceRequest->setSellerId($this->_sellerId); - $closeOrderReferenceRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $closeOrderReferenceRequest->setClosureReason(""Order complete""); - - return $this->_service->closeOrderReference($closeOrderReferenceRequest); - }" -drives,"* Create a new instance of the cli example and - * validate command line arguments - * - * @param array $argv arguments to the appplication passed from the command line","public function __construct($argv) - { - if (count($argv) < 1) { - print ""Missing mandatory argument: "" . - ""please provide an amazonOrderReferenceId""; - exit(0); - }" -drives,"* Run all the steps for the sample in sequence - *","public function runSample() - { - $orderTotal = $this->_calculateOrderTotalBasedOnBuyerDestinationAddress(); - $this->_addOrderTotalAndSellerInformationToOrder($orderTotal); - $this->_confirmOrderReference(); - $amazonAuthorizationId = $this->_authorizeOrderAmount($orderTotal); - $this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId); - $this->_captureOrderAmount($orderTotal, $amazonAuthorizationId); - $this->_closeOrderReference(); - print ""Payment capture completed"" . PHP_EOL; - }" -SplitShipmentsCheckoutExample,"* Create a new instance of the split shipments - * checkout example - * - * @param OffAmazonPaymentsService_Client $service instance of the service client - * - * @param string $amazonOrderReferenceId an order reference object in - * draft state to use in - * the example - * - * @return new SplitShipmentsCheckoutExample","public function __construct($service, $amazonOrderReferenceId) - { - $this->_service = $service; - $this->_amazonOrderReferenceId = $amazonOrderReferenceId; - - /* - * Setup shared identifiers for the series of transaction requests - */ - $this->_authorizationReferenceIdBase - = str_replace(""-"", """", $this->_amazonOrderReferenceId) . ""a01""; - $this->_captureReferenceIdBase = $this->_authorizationReferenceIdBase . ""c01""; - - $this->_sellerId - = $this->_service->getMerchantValues()->getMerchantId(); - - /* - * Initialize the variable holding the shipments that are part - * of the order - */ - $this->_orderShipments = array(); - $this->_itemsInStock = array( - new Item(""Apple"", 3.20), - new Item(""Pinapple"", 1.8), - new Item(""Banana"", 0.9), - new Item(""Orange"", 1.2), - new Item(""Pear"", 2.1) - ); - }" -SplitShipmentsCheckoutExample,"* Step 1: calcaulte the total value of the order and set the amount on the order - * reference - *","public function addOrderAmountToOrderReference() - { - $setOrderReferenceDetailsRequest = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest(); - $setOrderReferenceDetailsRequest->setSellerId($this->_sellerId); - $setOrderReferenceDetailsRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $setOrderReferenceDetailsRequest->setOrderReferenceAttributes(new OffAmazonPaymentsService_Model_OrderReferenceAttributes()); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->setOrderTotal(new OffAmazonPaymentsService_Model_OrderTotal()); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getOrderTotal()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); - $setOrderReferenceDetailsRequest->getOrderReferenceAttributes()->getOrderTotal()->setAmount($this->_getOrderTotal()); - - return $this->_service->setOrderReferenceDetails($setOrderReferenceDetailsRequest); - }" -SplitShipmentsCheckoutExample,"* Confirm the order reference information, allowing for - * authorizations and captures to be created - * - * @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse service response","public function confirmOrderReference() - { - $confirmOrderReferenceRequest - = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest(); - $confirmOrderReferenceRequest - ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $confirmOrderReferenceRequest->setSellerId($this->_sellerId); - - return $this->_service->confirmOrderReference($confirmOrderReferenceRequest); - }" -SplitShipmentsCheckoutExample,"* Perform the authorization for the shipment at the given index - * - * @param int $shipmentNumber order item index to authorize - * - * @return OffAmazonPaymentsService_Model_AuthorizeResponse service response","public function performAuthorizationForShipment($shipmentNumber) - { - $item = $this->_orderShipments[$shipmentNumber]; - - $authorizeRequest = new OffAmazonPaymentsService_Model_AuthorizeRequest(); - $authorizeRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $authorizeRequest->setSellerId($this->_sellerId); - $authorizeRequest - ->setAuthorizationReferenceId($this->_authorizationReferenceIdBase . $shipmentNumber); - $authorizeRequest->setAuthorizationAmount(new OffAmazonPaymentsService_Model_Price()); - $authorizeRequest->getAuthorizationAmount()->setAmount($item->price); - $authorizeRequest->getAuthorizationAmount()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); - - // Set the application timeout so that the polling request will - // get a definitive response within this period of time - $authorizeRequest->setTransactionTimeout(5); - - return $this->_service->authorize($authorizeRequest); - }" -SplitShipmentsCheckoutExample,"* Poll the API for the status of the Authorization Request, and continue - * once the status has been updated - * WARNING: This is not the way to integrate for production systems, - * instead merchants should use IPN to receive a callback once the - * processing has been completed. - * Note that Amazon reserves the right to throttle requests that - * ignore this advice and poll for a response - * - * @param string $amazonAuthorizationReferenceId authorization transaction to query - * - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse service response","public function waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId) - { - $getAuthorizationDetailsResponse = null; - do { - sleep(5); - $getAuthorizationDetailsResponse - = $this->getAuthorizationDetails($amazonAuthorizationId); - }" -SplitShipmentsCheckoutExample,"* Perform the getAuthroizationDetails request for the order - * - * @param string $amazonAuthorizationReferenceId authorization transaction - * to query - * - * @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse service response","public function getAuthorizationDetails($amazonAuthorizationId) - { - $getAuthorizationDetailsRequest = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest(); - $getAuthorizationDetailsRequest->setSellerId($this->_sellerId); - $getAuthorizationDetailsRequest->setAmazonAuthorizationId($amazonAuthorizationId); - - return $this->_service->getAuthorizationDetails($getAuthorizationDetailsRequest); - }" -SplitShipmentsCheckoutExample,"* Perform the capture for a single shipment - * - * @param int $shipmentNumber order item index to capture - * @param string $amazonAuthorizationId authorization to capture - * - * @return OffAmazonPayments_Model_CaptureResponse service response","public function performCaptureForShipment($shipmentNumber, $amazonAuthorizationId) - { - $item = $this->_orderShipments[$shipmentNumber]; - - $captureRequest = new OffAmazonPaymentsService_Model_CaptureRequest(); - $captureRequest->setSellerId($this->_sellerId); - $captureRequest->setAmazonAuthorizationId($amazonAuthorizationId); - $captureRequest - ->setCaptureReferenceId($this->_captureReferenceIdBase . $shipmentNumber); - $captureRequest->setCaptureAmount(new OffAmazonPaymentsService_Model_Price()); - $captureRequest->getCaptureAmount()->setAmount($item->price); - $captureRequest->getCaptureAmount()->setCurrencyCode($this->_service->getMerchantValues()->getCurrency()); - - return $this->_service->capture($captureRequest); - }" -SplitShipmentsCheckoutExample,"* Perform the get capture details call for the order - * - * @param string $amazonCaptureId capture it to get details for - * - * @return OffAmazonPaymentsService_Model_CaptureResponse service response","public function getCaptureDetails($amazonCaptureId) - { - $captureDetailsRequest - = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest(); - $captureDetailsRequest->setSellerId($this->_sellerId); - $captureDetailsRequest->setAmazonCaptureId($amazonCaptureId); - - return $this->_service->getCaptureDetails($captureDetailsRequest); - }" -SplitShipmentsCheckoutExample,"* Close this order reference to indicate that the order is complete, and - * no further authorizations and captures will be performed on this order - * - * @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse service response","public function closeOrderReference() - { - $closeOrderReferenceRequest = new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest(); - $closeOrderReferenceRequest->setSellerId($this->_sellerId); - $closeOrderReferenceRequest->setAmazonOrderReferenceId($this->_amazonOrderReferenceId); - $closeOrderReferenceRequest->setClosureReason(""Order complete""); - - return $this->_service->closeOrderReference($closeOrderReferenceRequest); - }" -SplitShipmentsCheckoutExample,"* Add a new shipment of an item to the order - * - * @param int $itemIndex index of the item to place in this order - *","public function addShipmentToOrder($itemIndex) - { - array_push($this->_orderShipments, $this->_itemsInStock[$itemIndex]); - }" -SplitShipmentsCheckoutExample,"* Return the names of the items available to place into the order - * - * @return array names of available items","public function getItemNames() - { - return array_map( - function($item) { - return $item->name; - }" -SplitShipmentsCheckoutExample,"* Return the total amount for the order - * - * @return int order total","public function __construct($name, $price) - { - $this->price = $price; - $this->name = $name; - }" -captures,"* Create a new instance of the cli example and - * validate command line arguments - * - * @param array $argv arguments to the application passed to the command line","public function __construct($argv) - { - if (count($argv) < 1) { - print ""Missing mandatory argument: "" . - ""please provide an amazonOrderReferenceId""; - exit(0); - }" -captures,"* Run all the steps for the sample in sequence - *","public function runSample() - { - $shipments = $this->_getNumberOfShipmentsInOrder(); - $this->_addShipmentsToOrder($shipments); - $this->_addOrderAmountToOrderReference(); - $this->_confirmOrderReference(); - $this->_performAuthAndCaptureForOrderShipments($shipments); - $this->_closeOrderReference(); - print ""Split shipments checkout example completed"" . PHP_EOL; - }" -to,* Utility class to help store data required for our payment scenario,"public function __construct ($shippingRates, $taxRates) - { - $this->shippingRates = $shippingRates; - $this->taxRates = $taxRates; - }" -AmazonButtonWidgetMapper,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('amazonActionPluginSpotName', 'string', 'amazonActionPlugin'); - $oRequirements->NeedsSourceObject('amazonPaymentMethodInternalName', 'string', 'amazon'); - }" -AmazonButtonWidgetMapper,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - if (false === \TdbShopShippingGroupList::GetShippingGroupsThatAllowPaymentWith($oVisitor->GetSourceObject('amazonPaymentMethodInternalName'))) { - $oVisitor->SetMappedValue('amazonPayment', array('amazonPaymentEnabled' => false)); - - return; - }" -AmazonWidgetMapper,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('basket', 'TShopBasket', TShopBasket::GetInstance()); - $oRequirements->NeedsSourceObject( - 'config', - '\\ChameleonSystem\\AmazonPaymentBundle\\AmazonPaymentGroupConfig', - AmazonPaymentConfigFactory::createConfig($this->getActivePortalId()) - ); - }" -AmazonWidgetMapper,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - /** @var TShopBasket $basket */ - $basket = $oVisitor->GetSourceObject('basket'); - /** @var AmazonPaymentGroupConfig $config */ - $config = $oVisitor->GetSourceObject('config'); - - $errorURL = array('module_fnc' => array('amazonActionPlugin' => 'widgetError')); - $data = array( - 'sellerId' => $config->getMerchantId(), - 'amazonOrderReferenceId' => $basket->getAmazonOrderReferenceId(), - 'errorURL' => \TTools::GetArrayAsURL($errorURL, '?'), - ); - - $oVisitor->SetMappedValueFromArray($data); - }" -AmazonPaymentExtranetAddress,* @return bool,"public function getIsAmazonShippingAddress() - { - return $this->isAmazonShippingAddress; - }" -AmazonPaymentExtranetAddress,* @param bool $isAmazonShippingAddress,"public function setIsAmazonShippingAddress($isAmazonShippingAddress) - { - $this->isAmazonShippingAddress = $isAmazonShippingAddress; - }" -AmazonPaymentExtranetUser,* @var \TdbDataExtranetUserAddress|null,"public function __sleep() - { - $paramList = parent::__sleep(); - $this->amazonSleepData = array(); - $this->amazonSleepData['amazonPaymentEnabled'] = $this->amazonPaymentEnabled; - $this->amazonSleepData['originalShippingAddress'] = $this->originalShippingAddress; - $this->amazonSleepData['originalBillingAddress'] = $this->originalBillingAddress; - $paramList[] = 'amazonSleepData'; - - return $paramList; - }" -AmazonPaymentExtranetUser,* @var \TdbDataExtranetUserAddress|null,"public function __wakeup() - { - parent::__wakeup(); - if (is_array($this->amazonSleepData)) { - $this->amazonPaymentEnabled = $this->amazonSleepData['amazonPaymentEnabled']; - $this->originalShippingAddress = $this->amazonSleepData['originalShippingAddress']; - $this->originalBillingAddress = $this->amazonSleepData['originalBillingAddress']; - $this->amazonSleepData = null; - }" -AmazonPaymentExtranetUser,"* we need this to store our private properties during sleep (php does not support private vars). - * - * @var array","public function isAmazonPaymentUser() - { - return true === $this->getAmazonPaymentEnabled(); - }" -AmazonPaymentExtranetUser,* @return bool,"public function resetAmazonAddresses() - { - if (true === $this->oShippingAddress->getIsAmazonShippingAddress()) { - $oldShippingAddress = $this->GetShippingAddress(); - if (null !== $this->originalShippingAddress) { - $newShippingAddress = $this->originalShippingAddress; - }" -AmazonPaymentExtranetUser,* @param bool $amazonPaymentEnabled,"public function setAmazonShippingAddress(\TdbDataExtranetUserAddress $address) - { - if (null === $this->oShippingAddress || false === $this->oShippingAddress->getIsAmazonShippingAddress()) { - $this->originalShippingAddress = $this->oShippingAddress; - }" -AmazonPaymentBasket,"* If an error occurs during the Amazon Pay checkout, this variable is set to true. - * - * @var bool","public function getAmazonOrderReferenceId() - { - return $this->amazonOrderReferenceId; - }" -AmazonPaymentBasket,* @return string|null,"public function setAmazonOrderReferenceId($amazonOrderReferenceId, TdbDataExtranetUser $user) - { - $this->amazonOrderReferenceId = $amazonOrderReferenceId; - if (null === $this->amazonOrderReferenceId) { - $this->resetAmazonPaymentReferenceData(); - $user->setAmazonPaymentEnabled(false); - }" -AmazonPaymentBasket,"* @param null $amazonOrderReferenceId - * @param TdbDataExtranetUser $user the user for whom the Amazon payment will be enabled. - * Note that the user object will be changed in memory, but not persistent - * - * @throws TPkgCmsException_LogAndMessage","public function resetAmazonPaymentReferenceData() - { - $this->amazonOrderReferenceId = null; - $this->amazonOrderReferenceValue = null; - }" -AmazonPaymentBasket,* @return bool,"public function hasAmazonPaymentError() - { - return $this->errorDuringAmazonCheckout; - }" -AmazonPaymentBasket,* @throws TPkgCmsException_LogAndMessage,"public function RecalculateBasket() - { - parent::RecalculateBasket(); - if (null !== $this->amazonOrderReferenceValue && round($this->amazonOrderReferenceValue, 2) === round($this->dCostTotal, 2)) { - return; - }" -AmazonPaymentHandler,* @var AmazonPaymentGroupConfig,"public function PostSelectPaymentHook($sMessageConsumer) - { - if (false === parent::PostSelectPaymentHook($sMessageConsumer)) { - return false; - }" -AmazonPaymentHandler,* @return string,"public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - if (false === parent::ExecutePayment($oOrder, $sMessageConsumer)) { - return false; - }" -AmazonPaymentHandler,* {@inheritdoc},"public function getAmazonOrderReferenceId() - { - return $this->GetUserPaymentDataItem(self::PARAMETER_ORDER_REFERENCE_ID); - }" -AmazonPaymentHandler,"* return true if capture on shipment is active. - * - * @return bool","public function paymentTransactionHandlerFactory($portalId) - { - return new AmazonPayment($this->getAmazonPaymentGroupConfig($portalId)); - }" -AmazonPaymentHandler,"* hook is called before the payment data is committed to the database. use it to cleanup/filter/add data you may - * want to include/exclude from the database. - * - * @param array $aPaymentData - * - * @return array","public function isCaptureOnShipment() - { - $isPaymentOnShipmentStored = $this->GetUserPaymentDataItem(self::PARAMETER_IS_PAYMENT_ON_SHIPMENT); - if (false !== $isPaymentOnShipmentStored) { - return '1' === $isPaymentOnShipmentStored; - }" -AmazonPaymentHandler,@var PortalDomainServiceInterface $portalDomainService,"public function getAmazonPaymentGroupConfig($portalId) - { - if (null !== $this->amazonPaymentGroupConfig) { - return $this->amazonPaymentGroupConfig; - }" -AmazonPaymentHandler,* @return AmazonPaymentGroupConfig,"public function setAmazonPaymentGroupConfig($amazonPaymentGroupConfig) - { - $this->amazonPaymentGroupConfig = $amazonPaymentGroupConfig; - }" -AmazonPaymentHandler,* @param AmazonPaymentGroupConfig $amazonPaymentGroupConfig,"public function GetExternalPaymentReferenceIdentifier() - { - return $this->getAmazonOrderReferenceId(); - }" -AmazonPaymentHandler,"* some payment methods (such as paypal) get a reference number from the external - * service, that allows the shop owner to identify the payment executed in their - * Webservice. Since it is sometimes necessary to provided this identifier. - * - * every payment method that provides such an identifier needs to overwrite this method - * - * returns an empty string, if the method has no identifier. - * - * @return string","public function isBlockForUserSelection() - { - if (null === TShopBasket::GetInstance()->getAmazonOrderReferenceId()) { - return true; - }" -AmazonShopOrder,"* returns amazon order reference id if the order was paid with amazon. throws an InvalidArgumentException if the - * order was not paid with amazon. - * - * @throws \InvalidArgumentException - * - * @return string","public function getAmazonOrderReferenceId() - { - $paymentHandler = $this->GetPaymentHandler(); - if (false === ($paymentHandler instanceof AmazonPaymentHandler)) { - throw new \InvalidArgumentException('order was not paid with amazon payment'); - }" -AmazonShopOrder,@var $paymentHandler AmazonPaymentHandler,"public function CreateOrderInDatabaseCompleteHook() - { - parent::CreateOrderInDatabaseCompleteHook(); - TdbDataExtranetUser::GetInstance()->setAmazonPaymentEnabled(false); - }" -AmazonShopPaymentHandlerGroup,* @var AmazonPaymentGroupConfig,"public function validateIPNRequestData(\TPkgShopPaymentIPNRequest $oRequest) - { - $payload = $oRequest->getRequestPayload(); - if (isset($payload['amazonNotificationObject']) && $payload['amazonNotificationObject'] instanceof \OffAmazonPaymentsNotifications_InvalidMessageException) { - throw new AmazonPaymentIPNInvalidException($oRequest, 'there was an error parsing the Amazon IPN', 0, $payload['amazonNotificationObject']); - }" -AmazonShopPaymentHandlerGroup,* @var Request,"public function getOrderFromRequestData($aRequestData) - { - if (!is_array($aRequestData) || false === isset($aRequestData['amazonReferenceIdManager'])) { - return null; - }" -AmazonShopPaymentHandlerGroup,* @var Connection,"public function processRawRequestData($aRequestData) - { - $request = $this->getRequest(); - $headers = $this->getRequestHeader(); - $body = $request->getContent(); - $aRequestData['raw'] = array('header' => $headers, 'body' => $body); - try { - $config = $this->getAmazonConfig($this->getActivePortalId()); - - $client = $config->getAmazonIPNAPI(); - $aRequestData['amazonNotificationObject'] = $client->parseRawMessage($headers, $body); - - $localId = null; - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Notification */ - $amazonNotificationObject = $aRequestData['amazonNotificationObject']; - switch ($amazonNotificationObject->getNotificationType()) { - case 'OrderReferenceNotification': - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_OrderReferenceNotification */ - $details = $amazonNotificationObject->getOrderReference(); - $idManager = $config->amazonReferenceIdManagerFactory( - $this->getDatabaseConnection(), - AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_AMAZON_ORDER_REFERENCE_ID, - $details->getAmazonOrderReferenceId() - ); - $aRequestData['amazonReferenceIdManager'] = $idManager; - break; - case 'AuthorizationNotification': - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_AuthorizationNotification */ - $details = $amazonNotificationObject->getAuthorizationDetails(); - $idManager = $config->amazonReferenceIdManagerFactory( - $this->getDatabaseConnection(), - AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID, - $details->getAuthorizationReferenceId() - ); - $aRequestData['amazonLocalReferenceId'] = $idManager->findFromLocalReferenceId( - $details->getAuthorizationReferenceId(), - IAmazonReferenceId::TYPE_AUTHORIZE - ); - $aRequestData['amazonReferenceIdManager'] = $idManager; - - break; - case 'CaptureNotification': - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_CaptureNotification */ - $details = $amazonNotificationObject->getCaptureDetails(); - $idManager = $config->amazonReferenceIdManagerFactory( - $this->getDatabaseConnection(), - AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID, - $details->getCaptureReferenceId() - ); - $aRequestData['amazonLocalReferenceId'] = $idManager->findFromLocalReferenceId( - $details->getCaptureReferenceId(), - IAmazonReferenceId::TYPE_CAPTURE - ); - $aRequestData['amazonReferenceIdManager'] = $idManager; - break; - case 'RefundNotification': - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Model_RefundNotification */ - $details = $amazonNotificationObject->getRefundDetails(); - $idManager = $config->amazonReferenceIdManagerFactory( - $this->getDatabaseConnection(), - AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID, - $details->getRefundReferenceId() - ); - $aRequestData['amazonLocalReferenceId'] = $idManager->findFromLocalReferenceId( - $details->getRefundReferenceId(), - IAmazonReferenceId::TYPE_REFUND - ); - $aRequestData['amazonReferenceIdManager'] = $idManager; - break; - }" -AmazonShopPaymentHandlerGroup,* {@inheritdoc},"public function getIPNStatus(\TPkgShopPaymentIPNRequest $oRequest) - { - $aPayload = $oRequest->getRequestPayload(); - /** @var $amazonNotificationObject \OffAmazonPaymentsNotifications_Notification */ - $amazonNotificationObject = $aPayload['amazonNotificationObject']; - $oStatus = \TdbPkgShopPaymentIpnStatus::GetNewInstance(); - if (false === $oStatus->LoadFromFields( - array( - 'code' => $amazonNotificationObject->getNotificationType(), - 'shop_payment_handler_group_id' => $this->id, - ) - ) - ) { - return null; - }" -AmazonShopPaymentHandlerGroup,* {@inheritdoc},"public function setDatabaseConnection(Connection $connection) - { - $this->databaseConnection = $connection; - }" -AmazonAddressStep,* {@inheritdoc},"public function Init() - { - parent::Init(); - $oUser = TdbDataExtranetUser::GetInstance(); - $shippingAddress = $oUser->GetShippingAddress(); - if (true === $shippingAddress->getIsAmazonShippingAddress()) { - $oUser->resetAmazonAddresses(); - $basket = $this->getShopService()->getActiveBasket(); - $basket->RecalculateBasket(); // need to recalculate maybe changing address can change basket amount (gross net change) - }" -AmazonAddressStep,@var PortalDomainServiceInterface $portalDomainService,"public function GetHtmlFooterIncludes() - { - $includes = parent::GetHtmlFooterIncludes(); - $includes[] = """"; - - return $includes; - }" -AmazonBasketOrderStep,* @return ExtranetUserProviderInterface,"public function Init() - { - parent::Init(); - $user = $this->getExtranetUserProvider()->getActiveUser(); - $user->setAmazonPaymentEnabled(false); - TShopBasket::GetInstance()->resetAmazonPaymentReferenceData(); - }" -AmazonConfirmOrderStep,* {@inheritdoc},"public function GetHtmlFooterIncludes() - { - $includes = parent::GetHtmlFooterIncludes(); - - $includes[] = """"; - $includes[] = """"; - - return $includes; - }" -AmazonShippingStep,* {@inheritdoc},"public function GetHtmlFooterIncludes() - { - $includes = parent::GetHtmlFooterIncludes(); - - $includes[] = """"; - - return $includes; - }" -AmazonShippingStep,* {@inheritdoc},"public function ChangeShippingGroup() - { - parent::ChangeShippingGroup(); - TShopBasket::GetInstance()->RecalculateBasket(); // need to recalculate so that the new value is sent to amazon - }" -AmazonShippingStep,* @return ExtranetUserProviderInterface,"public function Init() - { - parent::Init(); - if (false === $this->AllowAccessToStep(true)) { - $this->JumpToStep($this->GetPreviousStep()); - }" -AmazonShopBasket,@var PortalDomainServiceInterface $portalDomainService,"public function GetHtmlFooterIncludes() - { - $includes = parent::GetHtmlFooterIncludes(); - $activePortal = $this->getActivePortal(); - /* - * Always load Amazon payment JS if it is active for the current portal. Otherwise the button links would not - * work if the user just added a product via Ajax to the previously empty basket. - */ - if (false === $this->getPaymentInfoService()->isPaymentMethodActive('amazon', $activePortal)) { - return $includes; - }" -AmazonShopOrderWizard,@var PortalDomainServiceInterface $portalDomainService,"public function GetHtmlFooterIncludes() - { - $footerIncludes = array(); - try { - if (false === TdbShopShippingGroupList::GetShippingGroupsThatAllowPaymentWith('amazon')) { - return parent::GetHtmlFooterIncludes(); - }" -AmazonReferenceId,* @var int,"public function getLocalId() - { - return $this->localId; - }" -AmazonReferenceId,* @var string,"public function getAmazonId() - { - return $this->amazonId; - }" -AmazonReferenceId,"* return the transaction id associated with the counter. - * - * @return string","public function getValue() - { - return $this->value; - }" -AmazonReferenceId,* @param bool $captureNow,"public function __construct($type, $localId, $value, $transactionId) - { - $this->localId = $localId; - $this->value = $value; - $this->type = $type; - $this->transactionId = $transactionId; - $this->captureNow = false; - $this->requestMode = IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS; - }" -AmazonReferenceId,* @return bool,"public function setAmazonId($amazonId) - { - $this->amazonId = $amazonId; - }" -AmazonReferenceId,"* returns self::REQUEST_MODE_SYNCHRONOUS or self::REQUEST_MODE_ASYNCHRONOUS. - * - * @return int","public function getType() - { - return $this->type; - }" -AmazonReferenceId,"* @param int $requestMode - one of self::REQUEST_MODE_ASYNCHRONOUS - * - * @throws \InvalidArgumentException","public function getTransactionId() - { - return $this->transactionId; - }" -AmazonReferenceIdList,* @var string,"public function __construct($amazonOrderReferenceId, $type) - { - $this->type = $type; - $this->amazonOrderReferenceId = $amazonOrderReferenceId; - }" -AmazonReferenceIdList,* @var,"public function getNew($value, $transactionId = null) - { - $item = new AmazonReferenceId($this->type, $this->generateLocalId(), $value, $transactionId); - $this->mappingList[] = $item; - - return $item; - }" -AmazonReferenceIdList,* {@inheritdoc},"public function getIterator(): Traversable - { - return new \ArrayIterator($this->mappingList); - }" -AmazonReferenceIdList,"* (PHP 5 >= 5.0.0)
- * Retrieve an external iterator. - * - * @see http://php.net/manual/en/iteratoraggregate.getiterator.php - * - * @return Traversable An instance of an object implementing Iterator or - * Traversable - * @return \ArrayIterator","public function count(): int - { - return count($this->mappingList); - }" -AmazonReferenceIdList,"* (PHP 5 >= 5.1.0)
- * Count elements of an object. - * - * @see http://php.net/manual/en/countable.count.php - * - * @return int the custom count as an integer. - *

- *

- * The return value is cast to an integer","public function addItem(IAmazonReferenceId $item) - { - if ($item->getType() !== $this->type) { - throw new \InvalidArgumentException(""expecting item of type {$this->type}" -AmazonReferenceIdList,"* returns the last element in the list. - * - * @return IAmazonReferenceId","public function getLast() - { - return $this->mappingList[count($this->mappingList) - 1]; - }" -AmazonReferenceIdManager,* @var AmazonReferenceIdList[],"public function __construct($amazonOrderReferenceId, $shopOrderId) - { - $this->amazonOrderReferenceId = $amazonOrderReferenceId; - $this->shopOrderId = $shopOrderId; - $this->idLists = array( - IAmazonReferenceId::TYPE_AUTHORIZE => new AmazonReferenceIdList($amazonOrderReferenceId, IAmazonReferenceId::TYPE_AUTHORIZE), - IAmazonReferenceId::TYPE_CAPTURE => new AmazonReferenceIdList($amazonOrderReferenceId, IAmazonReferenceId::TYPE_CAPTURE), - IAmazonReferenceId::TYPE_REFUND => new AmazonReferenceIdList($amazonOrderReferenceId, IAmazonReferenceId::TYPE_REFUND), - ); - }" -AmazonReferenceIdManager,* @var string,"public function createLocalAuthorizationReferenceId($requestMode, $value) - { - /** @var $item IAmazonReferenceId */ - $item = $this->idLists[IAmazonReferenceId::TYPE_AUTHORIZE]->getNew($value, null); - $item->setRequestMode($requestMode); - - return $item; - }" -AmazonReferenceIdManager,* @var string,"public function createLocalAuthorizationReferenceIdWithCaptureNow($requestMode, $value, $transactionId) - { - /** @var $item IAmazonReferenceId */ - $item = $this->idLists[IAmazonReferenceId::TYPE_AUTHORIZE]->getNew($value, $transactionId); - $item->setRequestMode($requestMode); - $item->setCaptureNow(true); - - $captureItem = $this->createLocalCaptureReferenceId($item->getValue(), $transactionId); - $captureItem->setLocalId( - $item->getLocalId() - ); // captures created via capture now have the same id as the auth request - $captureItem->setRequestMode($requestMode); - $captureItem->setCaptureNow(true); - - return $item; - }" -AmazonReferenceIdManager,"* @param int $requestMode IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS or IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS - * @param float $value - * - * @return IAmazonReferenceId","public function createLocalCaptureReferenceId($value, $transactionId) - { - return $this->idLists[IAmazonReferenceId::TYPE_CAPTURE]->getNew($value, $transactionId); - }" -AmazonReferenceIdManager,@var $item IAmazonReferenceId,"public function createLocalRefundReferenceId($value, $transactionId) - { - return $this->idLists[IAmazonReferenceId::TYPE_REFUND]->getNew($value, $transactionId); - }" -AmazonReferenceIdManager,"* @param int $requestMode IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS or IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS - * @param float $value - * @param string $transactionId - shop payment transaction id - * - * @return IAmazonReferenceId","public function findFromLocalReferenceId($localId, $itemType) - { - /** @var $item IAmazonReferenceId */ - foreach ($this->idLists[$itemType] as $item) { - if ($localId === $item->getLocalId()) { - reset($this->idLists); - - return $item; - }" -AmazonReferenceIdManager,@var $item IAmazonReferenceId,"public function persist(Connection $dbal) - { - $dbal->beginTransaction(); - - $dbal->delete(self::PERSIST_TABLE, array('shop_order_id' => $this->getShopOrderId())); - reset($this->idLists); - /** @var $list IAmazonReferenceIdList */ - foreach ($this->idLists as $list) { - /** @var $item IAmazonReferenceId */ - foreach ($list as $item) { - $dbal->insert( - self::PERSIST_TABLE, - array( - 'id' => \TTools::GetUUID(), - 'local_id' => $item->getLocalId(), - 'shop_order_id' => $this->getShopOrderId(), - 'amazon_order_reference_id' => $this->amazonOrderReferenceId, - 'amazon_id' => (null !== $item->getAmazonId()) ? $item->getAmazonId() : '', - 'value' => $item->getValue(), - 'type' => $item->getType(), - 'request_mode' => (null !== $item->getRequestMode()) ? (string) $item->getRequestMode() : '', - 'capture_now' => (true === $item->getCaptureNow()) ? '1' : '0', - 'pkg_shop_payment_transaction_id' => (null !== $item->getTransactionId( - )) ? $item->getTransactionId() : '', - ) - ); - }" -AmazonReferenceIdManager,"* @param $value - * @param string $transactionId - the transaction id associated with the counter - * - * @return IAmazonReferenceId","public function delete(Connection $dbal) - { - $dbal->delete( - self::PERSIST_TABLE, - array( - 'amazon_order_reference_id' => $this->amazonOrderReferenceId, - 'shop_order_id' => $this->getShopOrderId(), - ) - ); - }" -AmazonReferenceIdManager,"* @param $value - * @param $transactionId - * - * @return IAmazonReferenceId","public function getAmazonOrderReferenceId() - { - return $this->amazonOrderReferenceId; - }" -AmazonReferenceIdManager,"* @param $localId - * @param int $itemType one of IAmazonReferenceId::TYPE_* - * - * @return IAmazonReferenceId|null","public function getShopOrderId() - { - return $this->shopOrderId; - }" -AmazonReferenceIdManager,@var $item IAmazonReferenceId,"public function getListOfAuthorizations() - { - if (0 === count($this->idLists[IAmazonReferenceId::TYPE_AUTHORIZE])) { - return null; - }" -AmazonReferenceIdManager,@var $list IAmazonReferenceIdList,"public function getListOfCaptures() - { - if (0 === count($this->idLists[IAmazonReferenceId::TYPE_CAPTURE])) { - return null; - }" -AbstractAmazonPaymentCaptureOrder,"* @param $includePhysicalProducts - * @param $includeDownloads - * - * @return \PHPUnit_Framework_MockObject_MockObject|\TdbShopOrder","public function test_amazon_api_error_on_set_order_reference_details() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->never())->method('SaveFieldsFast'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); - $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); - $amazonOrderRef->expects($this->never())->method('authorize'); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -AbstractAmazonPaymentCaptureOrder,@var \PHPUnit_Framework_MockObject_MockObject|\TdbShopOrder $order,"public function test_amazon_api_error_on_confirm_order_reference() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->never())->method('SaveFieldsFast'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference')->will($this->throwException($expectedException)); - $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); - $amazonOrderRef->expects($this->never())->method('authorize'); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -AbstractAmazonPaymentCaptureOrder,@var $paymentHandler AmazonPaymentHandler|\PHPUnit_Framework_MockObject_MockObject,"public function test_amazon_api_error_on_get_order_reference_details() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->never())->method('SaveFieldsFast'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails')->will($this->throwException($expectedException)); - $amazonOrderRef->expects($this->never())->method('authorize'); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -AbstractAmazonPaymentCaptureOrder,@var \TdbShopOrderItem $orderItem,"public function test_shippingAddressNotSet_constraint_error() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_NO_SHIPPING_ADDRESS); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->never())->method('SaveFieldsFast'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); - $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); - $amazonOrderRef->expects($this->never())->method('authorize'); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -AbstractAmazonPaymentCaptureOrder,@var \TdbShopOrderItem $orderItem,"public function test_paymentPlanNotSet_constraint_error() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_NO_PAYMENT_PLAN_SET); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->never())->method('SaveFieldsFast'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); - $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); - $amazonOrderRef->expects($this->never())->method('authorize'); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -AbstractAmazonPaymentCaptureOrder,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"public function test_AmountNotSet_constraint_error() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_NO_AMOUNT_SET); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->never())->method('SaveFieldsFast'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); - $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); - $amazonOrderRef->expects($this->never())->method('authorize'); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -AbstractAmazonPaymentCaptureOrder,"* @param \TdbShopOrder $order - * @param $includePhysicalProducts - * @param $includeDownloads - * - * @return \TPkgShopPaymentTransactionData","public function test_Unknown_constraint_error() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_UNKNOWN_CONSTRAINT); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->never())->method('SaveFieldsFast'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails')->will($this->throwException($expectedException)); - $amazonOrderRef->expects($this->never())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->never())->method('getOrderReferenceDetails'); - $amazonOrderRef->expects($this->never())->method('authorize'); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -AbstractAmazonPaymentCaptureOrder,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"public function test_InvalidCountry_error() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_INVALID_ADDRESS); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->never())->method('SaveFieldsFast'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails')->will($this->throwException($expectedException)); - $amazonOrderRef->expects($this->never())->method('authorize'); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -ConvertAddressFromAmazonToLocalTest,* @test,"public function it_converts_partial_amazon_address_to_local() - { - $sourceAddress = array( - 'City' => 'Freiburg', - 'PostalCode' => '79098', - 'CountryCode' => 'de', - ); - $expectedAddress = array( - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'data_country_id' => '1', - ); - /** @var \PHPUnit_Framework_MockObject_MockObject|AmazonDataConverter $amazonConverter */ - $amazonConverter = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonDataConverter')->setMethods( - array('getCountryIdFromAmazonCountryCode') - )->getMock(); - $amazonConverter->expects($this->any())->method('getCountryIdFromAmazonCountryCode')->will( - $this->returnValue('1') - ); - - $convertedAddress = $amazonConverter->convertAddressFromAmazonToLocal($sourceAddress, AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING); - - $this->assertEquals($expectedAddress, $convertedAddress); - }" -ConvertAddressFromAmazonToLocalTest,@var \PHPUnit_Framework_MockObject_MockObject|AmazonDataConverter $amazonConverter,"public function it_converts_full_amazon_address_to_local() - { - $sourceAddress = array( - 'Name' => 'Mr. Dev', - 'AddressLine1' => 'ESONO AG', - 'AddressLine2' => 'Grünwälderstr. 10-14', - 'AddressLine3' => '2 OG', - 'City' => 'Freiburg', - 'County' => '', - 'District' => '', - 'StateOrRegion' => '', - 'PostalCode' => '79098', - 'CountryCode' => 'de', - 'Phone' => '0761 15 18 28 0', - ); - $expectedAddress = array( - 'lastname' => 'Mr. Dev', - 'company' => 'ESONO AG', - 'street' => 'Grünwälderstr. 10-14', - 'address_additional_info' => '2 OG', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'data_country_id' => '1', - 'telefon' => '0761 15 18 28 0', - ); - $amazonPayment = new AmazonPayment($this->getConfig()); - - /** @var \PHPUnit_Framework_MockObject_MockObject|AmazonDataConverter $amazonConverter */ - $amazonConverter = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonDataConverter')->setMethods( - array('getCountryIdFromAmazonCountryCode') - )->getMock(); - $amazonConverter->expects($this->any())->method('getCountryIdFromAmazonCountryCode')->will( - $this->returnValue('1') - ); - - $convertedAddress = $amazonConverter->convertAddressFromAmazonToLocal($sourceAddress, AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING); - $this->assertEquals($expectedAddress, $convertedAddress); - }" -ConvertAddressFromAmazonToLocalTest,* @test,"public function it_fails_on_invalid_address() - { - $sourceData = array('foo' => 'bar'); - $amazonPayment = new AmazonDataConverter(); - - $amazonPayment->convertAddressFromAmazonToLocal($sourceData, AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING); - }" -ConvertAddressFromAmazonToLocalTest,@var \PHPUnit_Framework_MockObject_MockObject|AmazonDataConverter $amazonConverter,"public function test_get_local_from_amazon_address_lines() - { - // line1 = company - // line2 = street+nr - $sourceList = array( - array( - 'source' => array( - 'AddressLine1' => 'ESONO AG', - 'AddressLine2' => 'Grünwälderstr. 10-14', - 'AddressLine3' => '2 OG', - ), - 'target' => array( - 'company' => 'ESONO AG', - 'street' => 'Grünwälderstr. 10-14', - 'address_additional_info' => '2 OG', - ), - ), - array( - 'source' => array( - 'AddressLine1' => '', - 'AddressLine2' => 'Grünwälderstr. 10-14', - 'AddressLine3' => '2 OG', - ), - 'target' => array( - 'company' => '', - 'street' => 'Grünwälderstr. 10-14', - 'address_additional_info' => '2 OG', - ), - ), - array( - 'source' => array( - 'AddressLine1' => '', - 'AddressLine2' => 'Grünwälderstr. 10-14', - 'AddressLine3' => '', - ), - 'target' => array( - 'company' => '', - 'street' => 'Grünwälderstr. 10-14', - 'address_additional_info' => '', - ), - ), - ); - - foreach ($sourceList as $testCase) { - $amazonPayment = new AmazonDataConverter(); - $converted = $amazonPayment->convertAddressFromAmazonToLocal($testCase['source'], AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING); - ksort($converted); - ksort($testCase['target']); - $this->assertEquals($testCase['target'], $converted); - }" -ConvertAddressFromAmazonToLocalTest,"* @test - * @expectedException \InvalidArgumentException","public function test_convert_localToOrderAddressBilling() - { - $prefixList = array( - AmazonDataConverter::ORDER_ADDRESS_TYPE_BILLING => array( - 'adr_billing_salutation_id' => '', - 'adr_billing_firstname' => '', - 'adr_billing_streetnr' => '', - 'adr_billing_fax' => '', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_company' => 'ESONO AG', - 'adr_billing_street' => 'Grünwälderstr. 10-14', - 'adr_billing_additional_info' => '2 OG', - 'adr_billing_city' => 'Freiburg', - 'adr_billing_postalcode' => '79098', - 'adr_billing_country_id' => '1', - 'adr_billing_telefon' => '0761 15 18 28 0', - ), - AmazonDataConverter::ORDER_ADDRESS_TYPE_SHIPPING => array( - 'adr_shipping_salutation_id' => '', - 'adr_shipping_firstname' => '', - 'adr_shipping_streetnr' => '', - 'adr_shipping_fax' => '', - 'adr_shipping_lastname' => 'Mr. Dev', - 'adr_shipping_company' => 'ESONO AG', - 'adr_shipping_street' => 'Grünwälderstr. 10-14', - 'adr_shipping_additional_info' => '2 OG', - 'adr_shipping_city' => 'Freiburg', - 'adr_shipping_postalcode' => '79098', - 'adr_shipping_country_id' => '1', - 'adr_shipping_telefon' => '0761 15 18 28 0', - ), - ); - $sourceAddress = array( - 'lastname' => 'Mr. Dev', - 'company' => 'ESONO AG', - 'street' => 'Grünwälderstr. 10-14', - 'address_additional_info' => '2 OG', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'data_country_id' => '1', - 'telefon' => '0761 15 18 28 0', - ); - $converter = new AmazonDataConverter(); - foreach ($prefixList as $type => $expectedAddress) { - $result = $converter->convertLocalToOrderAddress($type, $sourceAddress); - $this->assertEquals($expectedAddress, $result); - }" -FindBestCaptureMatchForRefundTest,* expecting an exception.,"public function test_refund_matched_in_sum_by_one() - { - $expectedItemListFound = array('P01-1234567-1234567-0000004' => 30.00); - - $itemsInMatchList = array( - 'P01-1234567-1234567-0000001', // pending - 'P01-1234567-1234567-0000002', // success - 'P01-1234567-1234567-0000003', // closed - 'P01-1234567-1234567-0000004', // success-two - 'P01-1234567-1234567-0000005', // success-partial-refund - 'P01-1234567-1234567-0000006', // declined-ProcessingFailure - 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml - ); - - $captureList = $this->fixtureCaptureList(); - $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); - $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); - $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); - - $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); - - $this->assertEquals($expectedItemListFound, $itemListFound); - }" -FindBestCaptureMatchForRefundTest,* @return array,"public function test_refund_matched_in_sum_by_two() - { - $expectedItemListFound = array('P01-1234567-1234567-0000004' => 30.00, 'P01-1234567-1234567-0000002' => 94.50); - - $itemsInMatchList = array( - 'P01-1234567-1234567-0000001', // pending - 'P01-1234567-1234567-0000002', // success - 'P01-1234567-1234567-0000003', // closed - 'P01-1234567-1234567-0000004', // success-two - 'P01-1234567-1234567-0000005', // success-partial-refund - 'P01-1234567-1234567-0000006', // declined-ProcessingFailure - 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml - ); - - $captureList = $this->fixtureCaptureList(); - $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); - $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); - $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); - - $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); - - $this->assertEquals($expectedItemListFound, $itemListFound); - }" -FindBestCaptureMatchForRefundTest,@var $responseObject \OffAmazonPaymentsService_Model_CaptureDetails,"public function test_refund_matched_in_sum_by_one_larger_than_refund() - { - $expectedItemListFound = array('P01-1234567-1234567-0000002' => 94.50); - - $itemsInMatchList = array( - 'P01-1234567-1234567-0000001', // pending - 'P01-1234567-1234567-0000002', // success - 'P01-1234567-1234567-0000003', // closed - 'P01-1234567-1234567-0000004', // success-two - 'P01-1234567-1234567-0000005', // success-partial-refund - 'P01-1234567-1234567-0000006', // declined-ProcessingFailure - 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml - ); - - $captureList = $this->fixtureCaptureList(); - $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); - $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); - $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); - - $refundValue = $refundValue - 10; - - $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); - - $this->assertEquals($expectedItemListFound, $itemListFound); - }" -FindBestCaptureMatchForRefundTest,* @return AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"public function test_refund_matched_in_sum_by_two_larger_than_refund() - { - $expectedItemListFound = array('P01-1234567-1234567-0000005' => 50.00, 'P01-1234567-1234567-0000002' => 94.50); - - $itemsInMatchList = array( - 'P01-1234567-1234567-0000001', // pending - 'P01-1234567-1234567-0000002', // success - 'P01-1234567-1234567-0000003', // closed - 'P01-1234567-1234567-0000004', // success-two - 'P01-1234567-1234567-0000005', // success-partial-refund - 'P01-1234567-1234567-0000006', // declined-ProcessingFailure - 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml - ); - - $captureList = $this->fixtureCaptureList(); - $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); - $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); - $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); - - $refundValue = $refundValue - 10; - - $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); - - $this->assertEquals($expectedItemListFound, $itemListFound); - }" -FindBestCaptureMatchForRefundTest,@var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"public function test_refund_larger_then_remaining_captures() - { - $expectedItemListFound = array(); - - $itemsInMatchList = array( - 'P01-1234567-1234567-0000001', // pending - 'P01-1234567-1234567-0000002', // success - 'P01-1234567-1234567-0000003', // closed - 'P01-1234567-1234567-0000004', // success-two - 'P01-1234567-1234567-0000005', // success-partial-refund - 'P01-1234567-1234567-0000006', // declined-ProcessingFailure - 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml - ); - - $captureList = $this->fixtureCaptureList(); - $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList); - $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); - - $refundValue = 500; - - $expectedException = new \TPkgCmsException_LogAndMessage( - AmazonPayment::ERROR_NO_CAPTURE_FOUND_FOR_REFUND, - array('refundValue' => $refundValue, 'amazonIdListChecked' => implode(', ', $itemsInMatchList)) - ); - $exception = null; - - try { - $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); - }" -FindBestCaptureMatchForRefundTest,"* @param $captureList - * @param $itemsInMatchList - * - * @return AmazonReferenceIdList","public function test_api_error() - { - $amazonApiErrorThrown = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR, array( - 'responseCode' => '123', - 'errorCode' => 'InternalServerError', - 'errorType' => 'Unknown', - 'message' => 'There was an unknown error in the service', - )); - - $expectedItemListFound = array('P01-1234567-1234567-0000004' => 30); - - $itemsInMatchList = array( - 'P01-1234567-1234567-0000001', // pending - 'P01-1234567-1234567-0000002', // success - 'P01-1234567-1234567-0000003', // closed - 'P01-1234567-1234567-0000004', // success-two - 'P01-1234567-1234567-0000005', // success-partial-refund - 'P01-1234567-1234567-0000006', // declined-ProcessingFailure - 'P01-1234567-1234567-0000007', // declined-AmazonRejected.xml - ); - - $captureList = $this->fixtureCaptureList(); - $orderRefObject = $this->helperOrderReferenceObjectFactory($captureList, $itemsInMatchList, $amazonApiErrorThrown); - $list = $this->helperAmazonReferenceIdList($captureList, $itemsInMatchList); - $refundValue = $this->helperGetRefundValue($expectedItemListFound, $captureList); - - $expectedException = new \TPkgCmsException_LogAndMessage( - AmazonPayment::ERROR_NO_CAPTURE_FOUND_FOR_REFUND, - array('refundValue' => $refundValue, 'amazonIdListChecked' => implode(', ', $itemsInMatchList)) - ); - $exception = null; - - try { - $itemListFound = $orderRefObject->findBestCaptureMatchForRefund($list, $refundValue); - }" -GetOrderReferenceDetailsTest,* @expectedException \InvalidArgumentException,"public function test_success_before_order_was_confirmed() - { - $expectedResponse = AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('partial.xml'); - $config = $this->helperGetConfig($expectedResponse, null); - - $object = new AmazonOrderReferenceObject($config, 'ORDER-REFERENCE-ID'); - - $orderReferenceDetails = $object->getOrderReferenceDetails( - array( - IAmazonOrderReferenceObject::CONSTRAINT_AMOUNT_NOT_SET, - IAmazonOrderReferenceObject::CONSTRAINT_PAYMENT_PLAN_NOT_SET, - ) - ); - - $this->assertEquals($expectedResponse->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails(), $orderReferenceDetails); - }" -SetOrderReferenceDetailsTest,* @test,"public function test_success() - { - $expectedResponse = AmazonPaymentFixturesFactory::setOrderReferenceDetailsResponse('success.xml', 1234.56); - - $config = $this->helperGetConfig($expectedResponse); - - $amazonOrderReferenceObject = new AmazonOrderReferenceObject($config, $this->order->getAmazonOrderReferenceId()); - $response = $amazonOrderReferenceObject->setOrderReferenceDetails($this->order); - - $this->assertEquals($expectedResponse->getSetOrderReferenceDetailsResult()->getOrderReferenceDetails(), $response); - }" -SetOrderReferenceOrderValueTest,* @test,"public function test_success() - { - $expectedResponse = AmazonPaymentFixturesFactory::setOrderReferenceDetailsResponse('success.xml', 1234.56); - - $config = $this->helperGetConfig($expectedResponse); - - $amazonOrderReferenceObject = new AmazonOrderReferenceObject($config, $this->order->getAmazonOrderReferenceId()); - $response = $amazonOrderReferenceObject->setOrderReferenceOrderValue(1234.56); - - $this->assertEquals($expectedResponse->getSetOrderReferenceDetailsResult()->getOrderReferenceDetails(), $response); - }" -CancelOrderTest,@var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"public function test_success() - { - $config = $this->getConfig(); - /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderReferenceObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); - $amazonOrderReferenceObject->expects($this->once())->method('cancelOrderReference') - ->with($this->equalTo(self::FIXTURE_CANCELLATION_REASON)); - - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderReferenceObject)); - $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); - /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ - $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); - - $amazonPayment = new AmazonPayment($config); - $amazonPayment->cancelOrder($transactionManager, $order, self::FIXTURE_CANCELLATION_REASON); - }" -CancelOrderTest,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"public function test_api_error() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR, array( - 'responseCode' => '123', - 'errorCode' => 'InternalServerError', - 'errorType' => 'Unknown', - 'message' => 'There was an unknown error in the service', - )); - $config = $this->getConfig(); - /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderReferenceObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); - $amazonOrderReferenceObject->expects($this->once())->method('cancelOrderReference') - ->with($this->equalTo(self::FIXTURE_CANCELLATION_REASON)) - ->will($this->throwException($expectedException)); - - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderReferenceObject)); - $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); - /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ - $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); - - $amazonPayment = new AmazonPayment($config); - - $exception = null; - try { - $amazonPayment->cancelOrder($transactionManager, $order, self::FIXTURE_CANCELLATION_REASON); - }" -CaptureOrder_PayOnOrderCompletionTest,"* we expect the same results for every basket type, so create on helper method to cover all 3 cases. - * - * @param bool $physicalProducts - * @param bool $downloads","public function test_CaptureSuccessButSynchronousAuthReturnsPending() - { - $physicalProducts = false; - $downloads = true; - $order = $this->createOrderMock($physicalProducts, $downloads); - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->once())->method('SaveFieldsFast')->with( - $this->equalTo( - array( - 'user_email' => 'amazonpayment@rn.esono.de', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_telefon' => '+49 761 15 18 28 0', - 'adr_shipping_use_billing' => '0', - 'adr_shipping_salutation_id' => '', - 'adr_shipping_company' => 'ESONO AG', - 'adr_shipping_additional_info' => '2 OG', - 'adr_shipping_firstname' => '', - 'adr_shipping_lastname' => 'Mr. Dev', - 'adr_shipping_street' => 'Grünwälderstr. 10-14', - 'adr_shipping_streetnr' => '', - 'adr_shipping_city' => 'Freiburg', - 'adr_shipping_postalcode' => '79098', - 'adr_shipping_country_id' => '1', - 'adr_shipping_telefon' => '0761 15 18 28 0', - ) - ) - ); - - // - one transaction for the complete amount - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction', 'getTransactionDataFromOrder', 'confirmTransaction')); - $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, $physicalProducts, $downloads); - - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder')->will($this->returnValue($expectedTransactionData)); - /** @var $mockTransactionResponse \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $mockTransactionResponse->id = 'MOCK-TRANSACTION'; - $mockTransactionResponse->fieldSequenceNumber = 123; - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( - $mockTransactionResponse - ) - ); - - // the sync part should have its transaction confirmed - $transactionManager->expects($this->never())->method('confirmTransaction'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - - // - an auth + capture for the complete order - // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber - $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( - $this->equalTo($order), // \TdbShopOrder $order - $this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), // $localAuthorizationReferenceId - $this->equalTo($order->fieldValueTotal), // $amount - $this->equalTo(true), // $synchronous - $this->equalTo(null) // $invoiceNumber - )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('pending.xml')->getAuthorizeResult()->getAuthorizationDetails())); - $amazonOrderRef->expects($this->never())->method('authorize'); - - // mock amazonOrderRef Object methods so we get the expected response - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') - ->will( - $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() - ) - ); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - $mockLocalWithCaptureId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalWithCaptureId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID-WITH-CAPTURE')); - $mockLocalWithCaptureId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); - $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalWithCaptureId)); - $mockLocalWithCaptureAuthId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalWithCaptureAuthId->expects($this->once())->method('setAmazonId')->with($this->equalTo('AMAZON-CAPTURE-ID')); - $amazonReferenceIdManagerMock->expects($this->once())->method('findFromLocalReferenceId')->with($this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($mockLocalWithCaptureAuthId)); - - $amazonReferenceIdManagerMock->expects($this->exactly(2))->method('persist'); - - $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); - - // expect a transaction t - - $amazonPayment = new AmazonPayment($config); - $amazonPayment->setDb(self::$dbal); - $transaction = $amazonPayment->captureOrder($transactionManager, $order); - $this->assertEquals($mockTransactionResponse, $transaction); - }" -CaptureOrder_PayOnOrderCompletionTest,@var $mockTransactionResponse \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"public function test_capture_downloads_only() - { - $this->helperCaptureSuccess(false, true); - }" -CaptureOrder_PayOnOrderCompletionTest,"* we expect the same results for every basket type, so create on helper method to cover all 3 cases. - * - * @param bool $physicalProducts - * @param bool $downloads","public function test_capture_physical_products_only() - { - $this->helperCaptureSuccess(true, false); - }" -CaptureOrder_PayOnOrderCompletionTest,@var $mockTransactionResponse \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"public function test_capture_mixed_basket() - { - $this->helperCaptureSuccess(true, true); - }" -CaptureOrder_PayOnOrderCompletionTest,"* we always expect the order details to be set and the order reference to be confirmed. - * - * the order contains only downloads, so we expect - * - one transaction for the complete amount - * - an auth + capture for the complete order - * - the orders shipping address to be updated - * - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed)","public function test_amazon_api_error_downloads_only() - { - $this->helperAmazonApiErrorOnAuthorize(false, true); - }" -CaptureOrder_PayOnOrderCompletionTest,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"public function test_amazon_api_error_physical_only() - { - $this->helperAmazonApiErrorOnAuthorize(true, false); - }" -CaptureOrder_PayOnOrderCompletionTest,"* we expect the order to be canceled and otherwise unchanged. There should be no transaction, and neither auth nor auth+capture calls.","public function test_amazon_api_error_mixed() - { - $this->helperAmazonApiErrorOnAuthorize(true, true); - }" -CaptureOrder_PayOnOrderCompletionTest,* we expect the order to be canceled but otherwise unchanged. there should be no auth or auth+capture and no transactions.,"public function test_synchronous_auth_declined_invalidPaymentMethod() - { - $this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_INVALID_PAYMENT_METHOD, AmazonPayment::ERROR_AUTHORIZATION_DECLINED); - }" -CaptureOrder_PayOnOrderCompletionTest,"* the order reference was confirmed but not used. so we expect - * - the order ref object to be canceled - * - the order to be canceled and unchanged - * - no calls to auth or auth+capture - * - no transactions.","public function test_synchronous_auth_declined_amazonRejected() - { - $this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_AMAZON_REJECTED, AmazonPayment::ERROR_AUTHORIZATION_DECLINED); - }" -CaptureOrder_PayOnOrderCompletionTest,"* the error should be thrown when trying to setOrderReferenceDetails, so we expect the method to cancel the order.","public function test_synchronous_auth_declined_processingFailure() - { - $this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_PROCESSING_FAILURE, AmazonPayment::ERROR_AUTHORIZATION_DECLINED); - }" -CaptureOrder_PayOnOrderCompletionTest,* expect the same as test_shippingAddressNotSet_constraint_error.,"public function test_synchronous_auth_declined_transactionTimedOut() - { - $this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_TRANSACTION_TIMED_OUT, AmazonPayment::ERROR_AUTHORIZATION_DECLINED); - }" -CaptureOrder_PayOnOrderCompletionTest,* expect order to be canceled.,"public function test_amazon_api_error_on_set_order_reference_details() - { - parent::test_amazon_api_error_on_set_order_reference_details(); // expect same as paymentOnShipment - }" -CaptureOrder_PayOnOrderCompletionTest,* expect order to be canceled.,"public function test_amazon_api_error_on_confirm_order_reference() - { - parent::test_amazon_api_error_on_confirm_order_reference(); // expect same as paymentOnShipment - }" -CaptureOrder_PayOnOrderCompletionTest,* expect order to be canceled.,"public function test_amazon_api_error_on_get_order_reference_details() - { - parent::test_amazon_api_error_on_get_order_reference_details(); // expect same as paymentOnShipment - }" -CaptureOrder_PayOnShipmentTest,"* we always expect the order details to be set and the order reference to be confirmed. - * - * the order contains only downloads, so we expect - * - one transaction for the complete amount - * - an auth + capture for the complete order - * - the orders shipping address to be updated - * - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed)","public function test_capture_downloads_only() - { - $order = $this->createOrderMock(false, true); - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->once())->method('SaveFieldsFast')->with( - $this->equalTo( - array( - 'user_email' => 'amazonpayment@rn.esono.de', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_telefon' => '+49 761 15 18 28 0', - 'adr_shipping_use_billing' => '0', - 'adr_shipping_salutation_id' => '', - 'adr_shipping_company' => 'ESONO AG', - 'adr_shipping_additional_info' => '2 OG', - 'adr_shipping_firstname' => '', - 'adr_shipping_lastname' => 'Mr. Dev', - 'adr_shipping_street' => 'Grünwälderstr. 10-14', - 'adr_shipping_streetnr' => '', - 'adr_shipping_city' => 'Freiburg', - 'adr_shipping_postalcode' => '79098', - 'adr_shipping_country_id' => '1', - 'adr_shipping_telefon' => '0761 15 18 28 0', - ) - ) - ); - - // - one transaction for the complete amount - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction', 'getTransactionDataFromOrder', 'confirmTransaction')); - $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder')->will($this->returnValue($expectedTransactionData)); - $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $mockTransactionResponse->id = 'MOCK-TRANSACTION'; - $mockTransactionResponse->fieldSequenceNumber = 123; - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( - $mockTransactionResponse - ) - ); - $transactionManager->expects($this->once())->method('confirmTransaction')->with($this->equalTo(123), $this->anything())->will($this->returnValue($mockTransactionResponse)); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - - // - an auth + capture for the complete order - // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber - $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( - $this->equalTo($order), // \TdbShopOrder $order - $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId - $this->equalTo($order->fieldValueTotal), // $amount - $this->equalTo(true), // $synchronous - $this->equalTo(null) // $invoiceNumber - )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success-synchronous.xml')->getAuthorizeResult()->getAuthorizationDetails())); - - // mock amazonOrderRef Object methods so we get the expected response - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') - ->will( - $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() - ) - ); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); - $mockLocalId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); - $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - //$amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalId)); - $mockLocalWithCaptureAuthId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalWithCaptureAuthId->expects($this->once())->method('setAmazonId')->with($this->equalTo('AMAZON-CAPTURE-ID')); - $amazonReferenceIdManagerMock->expects($this->once())->method('findFromLocalReferenceId')->with($this->equalTo('LOCAL-AUTH-ID'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($mockLocalWithCaptureAuthId)); - $amazonReferenceIdManagerMock->expects($this->exactly(2))->method('persist'); - $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); - - $amazonPayment = new AmazonPayment($config); - $amazonPayment->setDb(self::$dbal); - $transaction = $amazonPayment->captureOrder($transactionManager, $order); - $this->assertEquals($mockTransactionResponse, $transaction); - }" -CaptureOrder_PayOnShipmentTest,* we expect to get an authorize only.,"public function test_capture_physical_products_only() - { - $order = $this->createOrderMock(true, false); - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->once())->method('SaveFieldsFast')->with( - $this->equalTo( - array( - 'user_email' => 'amazonpayment@rn.esono.de', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_telefon' => '+49 761 15 18 28 0', - 'adr_shipping_use_billing' => '0', - 'adr_shipping_salutation_id' => '', - 'adr_shipping_company' => 'ESONO AG', - 'adr_shipping_additional_info' => '2 OG', - 'adr_shipping_firstname' => '', - 'adr_shipping_lastname' => 'Mr. Dev', - 'adr_shipping_street' => 'Grünwälderstr. 10-14', - 'adr_shipping_streetnr' => '', - 'adr_shipping_city' => 'Freiburg', - 'adr_shipping_postalcode' => '79098', - 'adr_shipping_country_id' => '1', - 'adr_shipping_telefon' => '0761 15 18 28 0', - ) - ) - ); - - // - one transaction for the complete amount - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction', 'confirmTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - $transactionManager->expects($this->never())->method('confirmTransaction'); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - - // - an auth + capture for the complete order - // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber - $amazonOrderRef->expects($this->once())->method('authorize')->with( - $this->equalTo($order), // \TdbShopOrder $order - $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId - $this->equalTo($order->fieldValueTotal), // $amount - $this->equalTo(false) // $synchronous - )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - // mock amazonOrderRef Object methods so we get the expected response - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') - ->will( - $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() - ) - ); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); - $mockLocalId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); - $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); - $amazonReferenceIdManagerMock->expects($this->exactly(2))->method('persist'); - - $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); - - $amazonPayment = new AmazonPayment($config); - $amazonPayment->setDb(self::$dbal); - $transaction = $amazonPayment->captureOrder($transactionManager, $order); - $this->assertNull($transaction); - }" -CaptureOrder_PayOnShipmentTest,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"public function test_capture_mixed_basket() - { - $order = $this->createOrderMock(true, true); - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->once())->method('SaveFieldsFast')->with( - $this->equalTo( - array( - 'user_email' => 'amazonpayment@rn.esono.de', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_telefon' => '+49 761 15 18 28 0', - 'adr_shipping_use_billing' => '0', - 'adr_shipping_salutation_id' => '', - 'adr_shipping_company' => 'ESONO AG', - 'adr_shipping_additional_info' => '2 OG', - 'adr_shipping_firstname' => '', - 'adr_shipping_lastname' => 'Mr. Dev', - 'adr_shipping_street' => 'Grünwälderstr. 10-14', - 'adr_shipping_streetnr' => '', - 'adr_shipping_city' => 'Freiburg', - 'adr_shipping_postalcode' => '79098', - 'adr_shipping_country_id' => '1', - 'adr_shipping_telefon' => '0761 15 18 28 0', - ) - ) - ); - - // - one transaction for the complete amount - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction', 'confirmTransaction')); - $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); - $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); - $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $mockTransactionResponse->id = 'MOCK-TRANSACTION'; - $mockTransactionResponse->fieldSequenceNumber = 123; - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( - $mockTransactionResponse - ) - ); - $transactionManager->expects($this->once())->method('confirmTransaction')->with($this->equalTo(123), $this->anything())->will($this->returnValue($mockTransactionResponse)); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - - // - an auth + capture for the complete order - // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber - $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( - $this->equalTo($order), // \TdbShopOrder $order - $this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), // $localAuthorizationReferenceId - $this->equalTo($expectedTransactionData->getTotalValue()), // $amount - $this->equalTo(true), // $synchronous - $this->equalTo(null) // $invoiceNumber - )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success-synchronous.xml')->getAuthorizeResult()->getAuthorizationDetails())); - - $amazonOrderRef->expects($this->once())->method('authorize')->with( - $this->equalTo($order), // \TdbShopOrder $order - $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId - $this->equalTo($order->fieldValueTotal - $expectedTransactionData->getTotalValue()), // $amount - $this->equalTo(false) // $synchronous - )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); - - // mock amazonOrderRef Object methods so we get the expected response - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') - ->will( - $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() - ) - ); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); - $mockLocalId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); - $mockLocalWithCaptureId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalWithCaptureId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID-WITH-CAPTURE')); - $mockLocalWithCaptureId->expects($this->once())->method('setAmazonId')->with($this->equalTo('P01-1234567-1234567-0000001')); - $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalWithCaptureId)); - $mockLocalWithCaptureAuthId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalWithCaptureAuthId->expects($this->once())->method('setAmazonId')->with($this->equalTo('AMAZON-CAPTURE-ID')); - $amazonReferenceIdManagerMock->expects($this->once())->method('findFromLocalReferenceId')->with($this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($mockLocalWithCaptureAuthId)); - $amazonReferenceIdManagerMock->expects($this->exactly(4))->method('persist'); - - $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); - - $amazonPayment = new AmazonPayment($config); - $amazonPayment->setDb(self::$dbal); - $transaction = $amazonPayment->captureOrder($transactionManager, $order); - $this->assertEquals($mockTransactionResponse, $transaction); - }" -CaptureOrder_PayOnShipmentTest,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"public function test_amazon_api_error_downloads_only() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $order = $this->createOrderMock(false, true); - - // there should be no transaction - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); - $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); - $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $mockTransactionResponse->id = 'MOCK-TRANSACTION'; - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( - $mockTransactionResponse - ) - ); - - // throw the exception - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') - ->will( - $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() - ) - ); - - $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->will($this->throwException($expectedException)); - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); - $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalId)); - - $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - $amazonPayment->setDb(self::$dbal); - - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -CaptureOrder_PayOnShipmentTest,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"public function test_amazon_api_error_physical_only() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $order = $this->createOrderMock(true, false); - - // there should be no transaction - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $transactionManager->expects($this->never())->method('addTransaction'); - // throw the exception - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') - ->will( - $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() - ) - ); - - $amazonOrderRef->expects($this->once())->method('authorize')->will($this->throwException($expectedException)); - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); - $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); - - $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - $amazonPayment->setDb(self::$dbal); - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -CaptureOrder_PayOnShipmentTest,"* a mixed basket may generate an auth + capture and an auth without capture. if the aut without capture fails, but - * the auth with capture does not, then the order should NOT be marked as canceled.","public function test_amazon_api_error_mixed() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $order = $this->createOrderMock(true, true); - - // there should be no transaction - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); - $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); - $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $mockTransactionResponse->id = 'MOCK-TRANSACTION'; - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( - $mockTransactionResponse - ) - ); - - // throw the exception - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') - ->will( - $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() - ) - ); - - $amazonOrderRef->expects($this->any())->method('authorizeAndCapture')->will($this->throwException($expectedException)); - $amazonOrderRef->expects($this->any())->method('authorize')->will($this->throwException($expectedException)); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); - $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalId)); - - $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - $amazonPayment->setDb(self::$dbal); - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -CaptureOrder_PayOnShipmentTest,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"public function test_amazon_api_error_on_auth_without_capture_on_mixed_basket() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->once())->method('SaveFieldsFast')->with( - $this->equalTo( - array( - 'user_email' => 'amazonpayment@rn.esono.de', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_telefon' => '+49 761 15 18 28 0', - 'adr_shipping_use_billing' => '0', - 'adr_shipping_salutation_id' => '', - 'adr_shipping_company' => 'ESONO AG', - 'adr_shipping_additional_info' => '2 OG', - 'adr_shipping_firstname' => '', - 'adr_shipping_lastname' => 'Mr. Dev', - 'adr_shipping_street' => 'Grünwälderstr. 10-14', - 'adr_shipping_streetnr' => '', - 'adr_shipping_city' => 'Freiburg', - 'adr_shipping_postalcode' => '79098', - 'adr_shipping_country_id' => '1', - 'adr_shipping_telefon' => '0761 15 18 28 0', - ) - ) - ); - - // - one transaction for the complete amount - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); - $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); - $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $mockTransactionResponse->id = 'MOCK-TRANSACTION'; - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( - $mockTransactionResponse - ) - ); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - - // - an auth + capture for the complete order - // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber - $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( - $this->equalTo($order), // \TdbShopOrder $order - $this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), // $localAuthorizationReferenceId - $this->equalTo($expectedTransactionData->getTotalValue()), // $amount - $this->equalTo(true), // $synchronous - $this->equalTo(null) // $invoiceNumber - )->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success-synchronous.xml')->getAuthorizeResult()->getAuthorizationDetails())); - - $amazonOrderRef->expects($this->once())->method('authorize')->with( - $this->equalTo($order), // \TdbShopOrder $order - $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId - $this->equalTo($order->fieldValueTotal - $expectedTransactionData->getTotalValue()), // $amount - $this->equalTo(false) // $synchronous - )->will($this->throwException($expectedException)); - - // mock amazonOrderRef Object methods so we get the expected response - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') - ->will( - $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() - ) - ); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); - $mockLocalWithCaptureId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalWithCaptureId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID-WITH-CAPTURE')); - $mockLocalWithCaptureId->expects($this->once())->method('setAmazonId')->will($this->returnValue('P01-1234567-1234567-0000001')); - $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceId')->will($this->returnValue($mockLocalId)); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalWithCaptureId)); - $mockLocalWithCaptureAuthId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalWithCaptureAuthId->expects($this->once())->method('setAmazonId')->with($this->equalTo('AMAZON-CAPTURE-ID')); - $amazonReferenceIdManagerMock->expects($this->once())->method('findFromLocalReferenceId')->with($this->equalTo('LOCAL-AUTH-ID-WITH-CAPTURE'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($mockLocalWithCaptureAuthId)); - $amazonReferenceIdManagerMock->expects($this->exactly(3))->method('persist'); - - $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->never())->method('cancelOrder'); - $amazonPayment->setDb(self::$dbal); - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -CaptureOrder_PayOnShipmentTest,"* the capture + auth fails - since this is always called first, we expect the order to be canceled after this exception.","public function test_amazon_api_error_on_auth_with_capture_on_mixed_basket() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $order = $this->createOrderMock(true, true); - - // - the orders shipping address to be updated - // - the orders buyer data to be updated (email etc. we do not have access to the billing address until after the authorize is confirmed) - $order->expects($this->once())->method('SaveFieldsFast')->with( - $this->equalTo( - array( - 'user_email' => 'amazonpayment@rn.esono.de', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_telefon' => '+49 761 15 18 28 0', - 'adr_shipping_use_billing' => '0', - 'adr_shipping_salutation_id' => '', - 'adr_shipping_company' => 'ESONO AG', - 'adr_shipping_additional_info' => '2 OG', - 'adr_shipping_firstname' => '', - 'adr_shipping_lastname' => 'Mr. Dev', - 'adr_shipping_street' => 'Grünwälderstr. 10-14', - 'adr_shipping_streetnr' => '', - 'adr_shipping_city' => 'Freiburg', - 'adr_shipping_postalcode' => '79098', - 'adr_shipping_country_id' => '1', - 'adr_shipping_telefon' => '0761 15 18 28 0', - ) - ) - ); - - // - one transaction for the complete amount - $transactionManager = $this->helperGetTransactionManagerForOrder($order, array('addTransaction')); - $expectedTransactionData = $this->helperGetTransactionDataForOrder($order, false, true); - $expectedTransactionData->setContext(new \TPkgShopPaymentTransactionContext('amazon auth+capture on order completion (only downloads or pay on order completion)')); - $mockTransactionResponse = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $mockTransactionResponse->id = 'MOCK-TRANSACTION'; - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue( - $mockTransactionResponse - ) - ); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - - // - an auth + capture for the complete order - // \TdbShopOrder $order, $localAuthorizationReferenceId, $amount, $synchronous, $invoiceNumber - $amazonOrderRef->expects($this->once())->method('authorizeAndCapture')->with( - $this->equalTo($order), // \TdbShopOrder $order - $this->equalTo('LOCAL-AUTH-ID'), // $localAuthorizationReferenceId - $this->equalTo($expectedTransactionData->getTotalValue()), // $amount - $this->equalTo(true), // $synchronous - $this->equalTo(null) // $invoiceNumber - )->will($this->throwException($expectedException)); - - $amazonOrderRef->expects($this->never())->method('authorize'); - - // mock amazonOrderRef Object methods so we get the expected response - $amazonOrderRef->expects($this->once())->method('setOrderReferenceDetails'); - $amazonOrderRef->expects($this->once())->method('confirmOrderReference'); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails') - ->will( - $this->returnValue(AmazonPaymentFixturesFactory::getOrderReferenceDetailsResponse('full.xml')->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails() - ) - ); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - $mockLocalId = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceId')->disableOriginalConstructor()->getMock(); - $mockLocalId->expects($this->any())->method('getLocalId')->will($this->returnValue('LOCAL-AUTH-ID')); - - $amazonReferenceIdManagerMock = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonReferenceIdManagerMock->expects($this->any())->method('createLocalAuthorizationReferenceIdWithCaptureNow')->will($this->returnValue($mockLocalId)); - $amazonReferenceIdManagerMock->expects($this->once())->method('persist'); - - $this->getConfig()->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonReferenceIdManagerMock)); - - /** @var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject */ - $amazonPayment = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonPayment')->setMethods(array('cancelOrder'))->setConstructorArgs(array($config))->getMock(); - $amazonPayment->expects($this->once())->method('cancelOrder')->with($this->equalTo($transactionManager), $this->equalTo($order)); - $amazonPayment->setDb(self::$dbal); - $exception = null; - try { - $amazonPayment->captureOrder($transactionManager, $order); - }" -CaptureOrder_PayOnShipmentTest,@var $amazonPayment AmazonPayment|\PHPUnit_Framework_MockObject_MockObject,"public function test_synchronous_auth_declined_invalidPaymentMethod() - { - $this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_INVALID_PAYMENT_METHOD, AmazonPayment::ERROR_AUTHORIZATION_DECLINED); - }" -CaptureOrder_PayOnShipmentTest,"* we expect the order to be canceled and otherwise unchanged. There should be no transaction, and neither auth nor auth+capture calls.","public function test_synchronous_auth_declined_amazonRejected() - { - $this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_AMAZON_REJECTED, AmazonPayment::ERROR_AUTHORIZATION_DECLINED); - }" -CaptureOrder_PayOnShipmentTest,* we expect the order to be canceled but otherwise unchanged. there should be no auth or auth+capture and no transactions.,"public function test_synchronous_auth_declined_processingFailure() - { - $this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_PROCESSING_FAILURE, AmazonPayment::ERROR_AUTHORIZATION_DECLINED); - }" -CaptureOrder_PayOnShipmentTest,"* the order reference was confirmed but not used. so we expect - * - the order ref object to be canceled - * - the order to be canceled and unchanged - * - no calls to auth or auth+capture - * - no transactions.","public function test_synchronous_auth_declined_transactionTimedOut() - { - $this->helperSynchronousAuthRejected(AmazonAuthorizationDeclinedException::REASON_CODE_TRANSACTION_TIMED_OUT, AmazonPayment::ERROR_AUTHORIZATION_DECLINED); - }" -CaptureOrder_PayOnShipmentTest,"* the error should be thrown when trying to setOrderReferenceDetails, so we expect the method to cancel the order.","public function test_amazon_api_error_on_set_order_reference_details() - { - parent::test_amazon_api_error_on_set_order_reference_details(); // expect same as paymentOnShipment - }" -CaptureOrder_PayOnShipmentTest,* expect the same as test_shippingAddressNotSet_constraint_error.,"public function test_amazon_api_error_on_confirm_order_reference() - { - parent::test_amazon_api_error_on_confirm_order_reference(); // expect same as paymentOnShipment - }" -CaptureOrder_PayOnShipmentTest,* expect order to be canceled.,"public function test_amazon_api_error_on_get_order_reference_details() - { - parent::test_amazon_api_error_on_get_order_reference_details(); // expect same as paymentOnShipment - }" -CaptureOrder_PayOnShipmentTest,* expect order to be canceled.,"public function test_shippingAddressNotSet_constraint_error() - { - parent::test_shippingAddressNotSet_constraint_error(); // expect same as paymentOnShipment - }" -CaptureOrder_PayOnShipmentTest,* expect order to be canceled.,"public function test_paymentPlanNotSet_constraint_error() - { - parent::test_paymentPlanNotSet_constraint_error(); // expect same as paymentOnShipment - }" -CaptureShipmentTest,* a transaction is created and returned [will wait for the ipn for confirmation].,"public function test_capture_valid_existing_authorization() - { - $fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('pending.xml')->getCaptureResult()->getCaptureDetails(); - $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; - $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); - $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; - $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000001'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerMock( - $fixtureAmazonAuthorizationId, - $fixtureAuthorizationReferenceId, - $fixtureCaptureReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonCaptureId, - $fixtureAuthorizationValue, - $fixtureAmazonOrderRefId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - $amazonOrderRef->expects($this->once()) - ->method('captureExistingAuthorization') - ->with( - $this->equalTo($order), - $this->equalTo($fixtureAmazonAuthorizationId), - $this->equalTo($fixtureCaptureReferenceId), - $this->equalTo($fixtureCaptureValue), - $this->equalTo($fixtureSoftDescription)) - ->will($this->returnValue($fixtureAmazonCaptureApiResponse)); - - $amazonOrderRef->expects($this->once()) - ->method('getAuthorizationDetails') - ->with($this->equalTo($fixtureAmazonAuthorizationId)) - ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - - $payment = new AmazonPayment($config); - - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - $this->assertEquals($expectedTransaction, $transaction); - }" -CaptureShipmentTest,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"public function test_capture_success_with_completed_status() - { - $fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('success.xml')->getCaptureResult()->getCaptureDetails(); - $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; - $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); - $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; - $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000002'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerMock( - $fixtureAmazonAuthorizationId, - $fixtureAuthorizationReferenceId, - $fixtureCaptureReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonCaptureId, - $fixtureAuthorizationValue, - $fixtureAmazonOrderRefId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - $amazonOrderRef->expects($this->once()) - ->method('getAuthorizationDetails') - ->with($this->equalTo($fixtureAmazonAuthorizationId)) - ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); - - $amazonOrderRef->expects($this->once()) - ->method('captureExistingAuthorization') - ->with( - $this->equalTo($order), - $this->equalTo($fixtureAmazonAuthorizationId), - $this->equalTo($fixtureCaptureReferenceId), - $this->equalTo($fixtureCaptureValue), - $this->equalTo($fixtureSoftDescription)) - ->will($this->returnValue($fixtureAmazonCaptureApiResponse)); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - //confirmTransaction($iSequenceNumber, $iConfirmedDate) - $expectedConfirmedTransaction = $expectedTransaction; - $expectedConfirmedTransaction->fieldConfirmed = true; - - $transactionManager->expects($this->once()) - ->method('confirmTransaction') - ->with($this->equalTo($expectedTransaction->fieldSequenceNumber), $this->greaterThanOrEqual(time()))->will($this->returnValue($expectedConfirmedTransaction)); - $order->expects($this->once())->method('Load')->with($this->equalTo($order->id))->will($this->returnValue(true)); // if the transaction is confirmed, then the order will be refreshed - - $payment = new AmazonPayment($config); - - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - $this->assertEquals($expectedConfirmedTransaction, $transaction); - }" -CaptureShipmentTest,@var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"public function test_capture_with_product_item_list() - { - $fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('pending.xml')->getCaptureResult()->getCaptureDetails(); - $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; - $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); - $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; - $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000001'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - $fixtureCaptureProductList = array( - 'ORDER-ITEM-ID-1' => 2, - 'ORDER-ITEM-ID-2' => 1, - ); - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue, $fixtureCaptureProductList); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerMock( - $fixtureAmazonAuthorizationId, - $fixtureAuthorizationReferenceId, - $fixtureCaptureReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonCaptureId, - $fixtureAuthorizationValue, - $fixtureAmazonOrderRefId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - $amazonOrderRef->expects($this->once()) - ->method('captureExistingAuthorization') - ->with($this->equalTo($order), $this->equalTo($fixtureAmazonAuthorizationId), $this->equalTo($fixtureCaptureReferenceId), $this->equalTo($fixtureCaptureValue), $this->equalTo($fixtureSoftDescription)) - ->will($this->returnValue($fixtureAmazonCaptureApiResponse)); - - $amazonOrderRef->expects($this->once()) - ->method('getAuthorizationDetails') - ->with($this->equalTo($fixtureAmazonAuthorizationId)) - ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo($fixtureCaptureProductList)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - - $payment = new AmazonPayment($config); - - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription, $fixtureCaptureProductList); - $this->assertEquals($expectedTransaction, $transaction); - }" -CaptureShipmentTest,@var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject,"public function test_capture_closed_authorization() - { - // try to capture - the only auth we find is one that is marked as closed. - // we expect a new auth to be created - $fixtureAmazonAuthorizeApiResponse = AmazonPaymentFixturesFactory::authorize('closed-MaxCapturesProcessed.xml')->getAuthorizeResult()->getAuthorizationDetails(); - - $fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); - $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; - $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = 100; - $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; - $fixtureAmazonAuthorizationWithCaptureId = 'P01-1234567-1234567-0000001'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerCreateAuthWithCaptureMock( - $fixtureAmazonAuthorizationId, - $fixtureAuthorizationReferenceId, - $fixtureAuthorizeReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonAuthorizationWithCaptureId, - $fixtureAuthorizationValue, - $fixtureAmazonOrderRefId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - - $amazonOrderRef->expects($this->once()) - ->method('getAuthorizationDetails') - ->with($this->equalTo($fixtureAmazonAuthorizationId)) - ->will($this->returnValue($fixtureAmazonAuthorizeApiResponse)); - - $amazonOrderRef->expects($this->once()) - ->method('authorizeAndCapture') - ->with( - $this->equalTo($order), - $this->equalTo($fixtureAuthorizeReferenceId), - $this->equalTo($fixtureCaptureValue), - $this->equalTo(false), - $this->equalTo($fixtureSoftDescription) - ) - ->will($this->returnValue($fixtureAmazonAuthWithCaptureApiResponse)); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - - $payment = new AmazonPayment($config); - - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - $this->assertEquals($expectedTransaction, $transaction); - }" -CaptureShipmentTest,"* the capture returns the state immediately - so we don't need to wait for the ipn confirm, but can confirm the transaction - * immediately.","public function test_capture_expired_authorization() - { - $fixtureAmazonAuthorizeApiResponse = AmazonPaymentFixturesFactory::authorize('declined-TransactionTimedOut.xml')->getAuthorizeResult()->getAuthorizationDetails(); - - $fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); - $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; - $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = 100; - $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; - $fixtureAmazonAuthorizationWithCaptureId = 'P01-1234567-1234567-0000001'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerCreateAuthWithCaptureMock( - $fixtureAmazonAuthorizationId, - $fixtureAuthorizationReferenceId, - $fixtureAuthorizeReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonAuthorizationWithCaptureId, - $fixtureAuthorizationValue, - $fixtureAmazonOrderRefId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - - $amazonOrderRef->expects($this->once()) - ->method('getAuthorizationDetails') - ->with($this->equalTo($fixtureAmazonAuthorizationId)) - ->will($this->returnValue($fixtureAmazonAuthorizeApiResponse)); - - $amazonOrderRef->expects($this->once()) - ->method('authorizeAndCapture') - ->with( - $this->equalTo($order), - $this->equalTo($fixtureAuthorizeReferenceId), - $this->equalTo($fixtureCaptureValue), - $this->equalTo(false), - $this->equalTo($fixtureSoftDescription) - ) - ->will($this->returnValue($fixtureAmazonAuthWithCaptureApiResponse)); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - - $payment = new AmazonPayment($config); - - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - $this->assertEquals($expectedTransaction, $transaction); - }" -CaptureShipmentTest,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"public function test_capture_pending_authorization() - { - $fixtureAmazonAuthorizeApiResponse = AmazonPaymentFixturesFactory::authorize('pending.xml')->getAuthorizeResult()->getAuthorizationDetails(); - - $fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); - $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; - $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = 100; - $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; - $fixtureAmazonAuthorizationWithCaptureId = 'P01-1234567-1234567-0000001'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerCreateAuthWithCaptureMock( - $fixtureAmazonAuthorizationId, - $fixtureAuthorizationReferenceId, - $fixtureAuthorizeReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonAuthorizationWithCaptureId, - $fixtureAuthorizationValue, - $fixtureAmazonOrderRefId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - - $amazonOrderRef->expects($this->once()) - ->method('getAuthorizationDetails') - ->with($this->equalTo($fixtureAmazonAuthorizationId)) - ->will($this->returnValue($fixtureAmazonAuthorizeApiResponse)); - - $amazonOrderRef->expects($this->once()) - ->method('authorizeAndCapture') - ->with( - $this->equalTo($order), - $this->equalTo($fixtureAuthorizeReferenceId), - $this->equalTo($fixtureCaptureValue), - $this->equalTo(false), - $this->equalTo($fixtureSoftDescription) - ) - ->will($this->returnValue($fixtureAmazonAuthWithCaptureApiResponse)); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - - $payment = new AmazonPayment($config); - - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - $this->assertEquals($expectedTransaction, $transaction); - }" -CaptureShipmentTest,@var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"public function test_capture_no_existing_authorization() - { - $fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = 100; - $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; - $fixtureAmazonAuthorizationWithCaptureId = 'P01-1234567-1234567-0000001'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerCreateAuthWithCaptureNoAuthFoundMock( - $fixtureAuthorizeReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonAuthorizationWithCaptureId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - - $amazonOrderRef->expects($this->never()) - ->method('getAuthorizationDetails'); - - $amazonOrderRef->expects($this->once()) - ->method('authorizeAndCapture') - ->with( - $this->equalTo($order), - $this->equalTo($fixtureAuthorizeReferenceId), - $this->equalTo($fixtureCaptureValue), - $this->equalTo(false), - $this->equalTo($fixtureSoftDescription) - ) - ->will($this->returnValue($fixtureAmazonAuthWithCaptureApiResponse)); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - - $payment = new AmazonPayment($config); - - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - $this->assertEquals($expectedTransaction, $transaction); - }" -CaptureShipmentTest,@var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject,"public function test_capture_auth_ok_but_capture_declined() - { - $fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('declined-AmazonRejected.xml')->getCaptureResult()->getCaptureDetails(); - $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; - $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); - $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; - $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000002'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerForFailedCapturesMock( - $fixtureAmazonAuthorizationId, - $fixtureAuthorizationReferenceId, - $fixtureCaptureReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonCaptureId, - $fixtureAuthorizationValue, - $fixtureAmazonOrderRefId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - $amazonOrderRef->expects($this->once()) - ->method('captureExistingAuthorization') - ->with($this->equalTo($order), $this->equalTo($fixtureAmazonAuthorizationId), $this->equalTo($fixtureCaptureReferenceId), $this->equalTo($fixtureCaptureValue), $this->equalTo($fixtureSoftDescription)) - ->will($this->throwException(new AmazonCaptureDeclinedException(AmazonCaptureDeclinedException::REASON_CODE_AMAZON_REJECTED))); - - $amazonOrderRef->expects($this->once()) - ->method('getAuthorizationDetails') - ->with($this->equalTo($fixtureAmazonAuthorizationId)) - ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - - $payment = new AmazonPayment($config); - - $exception = null; - try { - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - }" -CaptureShipmentTest,* same as test_capture_valid_existing_authorization but the items should be connected to the transaction.,"public function test_api_error_on_getAuthorizationDetails() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $fixtureAmazonCaptureApiResponse = AmazonPaymentFixturesFactory::capture('pending.xml')->getCaptureResult()->getCaptureDetails(); - $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; - $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = $fixtureAmazonCaptureApiResponse->getCaptureAmount()->getAmount(); - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - // setup local id manager - $item = new AmazonReferenceId(IAmazonReferenceId::TYPE_AUTHORIZE, $fixtureAuthorizationReferenceId, $fixtureAuthorizationValue, null); - $item->setAmazonId($fixtureAmazonAuthorizationId); - $idList = new AmazonReferenceIdList($fixtureAmazonOrderRefId, IAmazonReferenceId::TYPE_AUTHORIZE); - $idList->addItem($item); - - /** @var $idManager AmazonReferenceIdManager|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager') - ->setMethods(array('persist', 'createLocalCaptureReferenceId', 'getListOfAuthorizations', 'findFromLocalReferenceId')) - ->setConstructorArgs(array(self::FIXTURE_AMAZON_ORDER_REFERENCE_ID, self::FIXTURE_SHOP_ORDER_ID)) - - ->getMock(); - - $idManager->expects($this->never())->method('createLocalCaptureReferenceId'); - $idManager->expects($this->once())->method('getListOfAuthorizations')->will($this->returnValue($idList)); - $idManager->expects($this->never())->method('persist'); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - $amazonOrderRef->expects($this->never()) - ->method('captureExistingAuthorization'); - $amazonOrderRef->expects($this->never())->method('authorizeAndCapture'); - $amazonOrderRef->expects($this->once()) - ->method('getAuthorizationDetails') - ->with($this->equalTo($fixtureAmazonAuthorizationId)) - ->will($this->throwException($expectedException)); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - - $transactionManager->expects($this->never())->method('addTransaction'); - - $payment = new AmazonPayment($config); - $exception = null; - try { - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - }" -CaptureShipmentTest,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"public function test_api_error_on_captureExistingAuthorization() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $fixtureAmazonAuthorizationId = 'AMAZON-AUTHORIZATION-ID'; - $fixtureAuthorizationReferenceId = 'AUTHORIZATION-REFERENCE-ID'; - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = 100; - $fixtureCaptureReferenceId = 'CAPTURE-REFERENCE-ID'; - $fixtureAmazonCaptureId = 'P01-1234567-1234567-0000002'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerForFailedCapturesMock( - $fixtureAmazonAuthorizationId, - $fixtureAuthorizationReferenceId, - $fixtureCaptureReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonCaptureId, - $fixtureAuthorizationValue, - $fixtureAmazonOrderRefId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - $amazonOrderRef->expects($this->once()) - ->method('captureExistingAuthorization') - ->with($this->equalTo($order), $this->equalTo($fixtureAmazonAuthorizationId), $this->equalTo($fixtureCaptureReferenceId), $this->equalTo($fixtureCaptureValue), $this->equalTo($fixtureSoftDescription)) - ->will($this->throwException($expectedException)); - - $amazonOrderRef->expects($this->once()) - ->method('getAuthorizationDetails') - ->with($this->equalTo($fixtureAmazonAuthorizationId)) - ->will($this->returnValue(AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails())); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->once())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - - $payment = new AmazonPayment($config); - - $exception = null; - try { - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - }" -CaptureShipmentTest,@var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"public function test_api_error_on_authorizeAndCapture() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - $fixtureAmazonAuthWithCaptureApiResponse = AmazonPaymentFixturesFactory::authorize('success.xml')->getAuthorizeResult()->getAuthorizationDetails(); - - $fixtureOrderValue = 200.99; - $fixtureAuthorizationValue = 150.99; - $fixtureCaptureValue = 100; - $fixtureAuthorizeReferenceId = 'AUTHORIZE-REFERENCE-ID'; - $fixtureAmazonAuthorizeId = 'P01-1234567-1234567-0000002'; - $fixtureAmazonOrderRefId = self::FIXTURE_AMAZON_ORDER_REFERENCE_ID; - $fixtureSoftDescription = 'SOFT-DESCRIPTION'; - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->fixtureOrderMock($fixtureOrderValue); - - /** @var $expectedTransaction \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $expectedTransaction = $this->fixtureTransactionMock(); - - $expectedTransactionData = $this->fixtureTransactionDataMock($order, $fixtureCaptureValue); - - /** @var $expectedLocalCaptureIdObject AmazonReferenceId|\PHPUnit_Framework_MockObject_MockObject */ - $idManager = $this->fixtureIdManagerCreateAuthWithCaptureNoAuthFoundAndFailedAuthMock( - $fixtureAuthorizeReferenceId, - $fixtureCaptureValue, - $expectedTransaction, - $fixtureAmazonAuthorizeId - ); - - $amazonOrderRef = $this->fixtureAmazonOrderReferenceObjectMock($fixtureAmazonOrderRefId); - - $amazonOrderRef->expects($this->never()) - ->method('getAuthorizationDetails'); - - $amazonOrderRef->expects($this->once()) - ->method('authorizeAndCapture') - ->with( - $this->equalTo($order), - $this->equalTo($fixtureAuthorizeReferenceId), - $this->equalTo($fixtureCaptureValue), - $this->equalTo(false), - $this->equalTo($fixtureSoftDescription) - ) - ->will($this->throwException($expectedException)); - - $config = $this->fixtureAmazonPaymentConfigMock($fixtureAmazonOrderRefId, $amazonOrderRef, $idManager); - - $transactionManager = $this->getTransactionManager($order); - $transactionManager->expects($this->once())->method('getTransactionDataFromOrder') - ->with($this->equalTo(\TPkgShopPaymentTransactionData::TYPE_PAYMENT), $this->equalTo(null)) - ->will($this->returnValue($expectedTransactionData)); - $transactionManager->expects($this->any())->method('addTransaction')->with($this->equalTo($expectedTransactionData))->will($this->returnValue($expectedTransaction)); - - $payment = new AmazonPayment($config); - - $exception = null; - try { - $transaction = $payment->captureShipment($transactionManager, $order, $fixtureCaptureValue, $fixtureSoftDescription); - }" -RefundTest,"* GIVEN I have a transactionManager - * AND I have an order - * AND I have a refundValue ""1234.56"" - * AND I have an invoiceNumber ""INVOICE"" - * WHEN I call ""refund"" - * THEN I should get a response ""Pending"".","public function test_pending() - { - $expectedTransactions = array( - 'TRANSACTION-ID-1' => array( - 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', - 'response' => AmazonPaymentFixturesFactory::refund('pending-1.xml')->getRefundResult()->getRefundDetails(), - ), - ); - - // ------------------------------------------------------------------------------------------------------------- - $config = $this->getConfig(); - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); - - $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); - - /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ - $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); - $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); - $transactionManager = $this->helperAddConfirmTransactionToTransactionManager($transactionManager, $expectedTransactionList, $expectedTransactions); - - $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); - $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); - - /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); - $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); - $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); - - $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); - - // ------------------------------------------------------------------------------------------------------------- - $amazonPayment = new AmazonPayment($config); - $transactionList = $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE); - - $this->assertEquals($expectedTransactionList, $transactionList); - // ------------------------------------------------------------------------------------------------------------- - }" -RefundTest,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"public function test_pending_with_orderItemList() - { - $expectedTransactions = array( - 'TRANSACTION-ID-1' => array( - 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', - 'response' => AmazonPaymentFixturesFactory::refund('pending-1.xml')->getRefundResult()->getRefundDetails(), - ), - ); - - $refundItemList = array('SHOP-ORDER-ITEM-ID-1' => 1); - - // ------------------------------------------------------------------------------------------------------------- - $config = $this->getConfig(); - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); - - $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); - - $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); - $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager, $refundItemList); - - $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); - $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); - - /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); - $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); - $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); - - $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); - - // ------------------------------------------------------------------------------------------------------------- - $amazonPayment = new AmazonPayment($config); - $transactionList = $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE, $refundItemList); - - $this->assertEquals($expectedTransactionList, $transactionList); - // ------------------------------------------------------------------------------------------------------------- - }" -RefundTest,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"public function test_multi_capture_refund() - { - $expectedTransactions = array( - 'TRANSACTION-ID-1' => array( - 'amazonCaptureId' => 'AMAZON-CAPTURE-ID-1', - 'response' => AmazonPaymentFixturesFactory::refund('pending-1.xml')->getRefundResult()->getRefundDetails(), - ), - 'TRANSACTION-ID-2' => array( - 'amazonCaptureId' => 'AMAZON-CAPTURE-ID-2', - 'response' => AmazonPaymentFixturesFactory::refund('pending-2.xml')->getRefundResult()->getRefundDetails(), - ), - ); - - // ------------------------------------------------------------------------------------------------------------- - $config = $this->getConfig(); - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); - - $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); - - /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ - $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); - $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); - - $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); - $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); - - /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); - $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); - $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); - - $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); - - // ------------------------------------------------------------------------------------------------------------- - $amazonPayment = new AmazonPayment($config); - $transactionList = $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE); - - $this->assertEquals($expectedTransactionList, $transactionList); - // ------------------------------------------------------------------------------------------------------------- - }" -RefundTest,@var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"public function test_completed() - { - $expectedTransactions = array( - 'TRANSACTION-ID-1' => array( - 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', - 'response' => AmazonPaymentFixturesFactory::refund('success.xml')->getRefundResult()->getRefundDetails(), - ), - ); - - // ------------------------------------------------------------------------------------------------------------- - $config = $this->getConfig(); - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); - - $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); - - /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ - $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); - $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); - $transactionManager = $this->helperAddConfirmTransactionToTransactionManager($transactionManager, $expectedTransactionList, $expectedTransactions); - - $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); - $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); - - /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); - $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); - $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); - - $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); - - // ------------------------------------------------------------------------------------------------------------- - $amazonPayment = new AmazonPayment($config); - $transactionList = $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE); - - $this->assertEquals($expectedTransactionList, $transactionList); - // ------------------------------------------------------------------------------------------------------------- - }" -RefundTest,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"public function test_declined() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_REFUND_DECLINED, - array( - 'reasonCode' => 'AmazonRejected', - 'reasonDescription' => 'REASON DESCRIPTION', - ) - ); - - $expectedTransactions = array( - 'TRANSACTION-ID-1' => array( - 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', - 'response' => AmazonPaymentFixturesFactory::refund('declined-AmazonRejected.xml')->getRefundResult()->getRefundDetails(), - 'exception' => new AmazonRefundDeclinedException(AmazonRefundDeclinedException::REASON_CODE_AMAZON_REJECTED, array( - 'reasonCode' => 'AmazonRejected', - 'reasonDescription' => 'REASON DESCRIPTION', - )), - ), - ); - - // ------------------------------------------------------------------------------------------------------------- - $config = $this->getConfig(); - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); - - $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); - - /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ - $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); - $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); - - $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); - $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); - - /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); - $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); - $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); - - $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); - - // ------------------------------------------------------------------------------------------------------------- - - $exception = null; - try { - $amazonPayment = new AmazonPayment($config); - $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE); - }" -RefundTest,@var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"public function test_decline_with_one_success() - { - $expectedTransactions = array( - 'TRANSACTION-ID-1' => array( - 'amazonCaptureId' => 'AMAZON-CAPTURE-ID-1', - 'response' => AmazonPaymentFixturesFactory::refund('pending-1.xml')->getRefundResult()->getRefundDetails(), - ), - 'TRANSACTION-ID-2' => array( - 'amazonCaptureId' => 'AMAZON-CAPTURE-ID-2', - 'response' => AmazonPaymentFixturesFactory::refund('declined-AmazonRejected.xml')->getRefundResult()->getRefundDetails(), - 'exception' => new AmazonRefundDeclinedException(AmazonRefundDeclinedException::REASON_CODE_AMAZON_REJECTED, array( - 'reasonCode' => 'AmazonRejected', - 'reasonDescription' => 'REASON DESCRIPTION', - )), - ), - ); - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_REFUND_DECLINED, - array( - 'reasonCode' => 'AmazonRejected', - 'reasonDescription' => 'REASON DESCRIPTION', - ) - ); - - $refundValue = 0; - foreach ($expectedTransactions as $details) { - /** @var $response \OffAmazonPaymentsService_Model_RefundDetails */ - $response = $details['response']; - $refundValue += round($response->getRefundAmount()->getAmount()); - }" -RefundTest,@var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"public function test_api_error() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR, array( - 'responseCode' => '123', - 'errorCode' => 'InternalServerError', - 'errorType' => 'Unknown', - 'message' => 'There was an unknown error in the service', - )); - $expectedTransactions = array( - 'TRANSACTION-ID-1' => array( - 'amazonCaptureId' => 'AMAZON-CAPTURE-ID', - 'response' => AmazonPaymentFixturesFactory::refund('success.xml')->getRefundResult()->getRefundDetails(), - 'exception' => $expectedException, - ), - ); - - // ------------------------------------------------------------------------------------------------------------- - $config = $this->getConfig(); - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonIdManager = $this->helperAddIdManagerExpectations($expectedTransactions, $amazonIdManager); - - $expectedTransactionList = $this->helperGetExpectedTransactionList($expectedTransactions); - - /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ - $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); - $transactionManager = $this->helperAddExpectedAddTransactionCallsToManager($expectedTransactionList, $order, $transactionManager); - - $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); - $amazonIdManager->expects($this->once())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); - - /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); - $amazonOrderRef = $this->helperAddExpectedCaptureList($amazonOrderRef, $expectedTransactions, $amazonCaptureList); - $amazonOrderRef = $this->helperAddExpectedRefundCallsToOrderRefObject($amazonOrderRef, $expectedTransactions, $order); - - $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); - - // ------------------------------------------------------------------------------------------------------------- - - $exception = null; - try { - $amazonPayment = new AmazonPayment($config); - $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE); - }" -RefundTest,@var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject,"public function test_no_matching_capture_found() - { - $expectedException = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_NO_CAPTURE_FOUND_FOR_REFUND, array('refundValue' => self::FIXTURE_REFUND_VALUE, 'amazonIdListChecked' => array())); - $config = $this->getConfig(); - /** @var $amazonOrderRef IAmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\Interfaces\IAmazonOrderReferenceObject')->getMockForAbstractClass(); - $amazonOrderRef->expects($this->once())->method('findBestCaptureMatchForRefund')->will($this->returnValue(array())); - - /** @var $order \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject */ - $order = $this->getMockBuilder('TdbShopOrder')->disableOriginalConstructor()->getMock(); - - $amazonIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->disableOriginalConstructor()->getMock(); - $amazonCaptureList = new AmazonReferenceIdList(self::FIXTURE_AMAZON_ORDER_REFERENCE, IAmazonReferenceId::TYPE_CAPTURE); - $amazonIdManager->expects($this->any())->method('getListOfCaptures')->will($this->returnValue($amazonCaptureList)); - - /** @var $transactionManager \TPkgShopPaymentTransactionManager|\PHPUnit_Framework_MockObject_MockObject */ - $transactionManager = $this->getMockBuilder('TPkgShopPaymentTransactionManager')->disableOriginalConstructor()->getMock(); - - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($amazonOrderRef)); - $config->expects($this->any())->method('amazonReferenceIdManagerFactory')->will($this->returnValue($amazonIdManager)); - - $exception = null; - try { - $amazonPayment = new AmazonPayment($config); - $amazonPayment->refund($transactionManager, $order, self::FIXTURE_REFUND_VALUE, self::FIXTURE_INVOICE_NUMBER, self::FIXTURE_SELLER_REFUND_NOTE); - }" -UpdateWithSelectedShippingAddress,* amazon api error.,"public function testGuestSuccess() - { - // we expect the user to be updated with data from the amazon api - - $amazonUserData = array( - 'City' => 'Freiburg', 'StateOrRegion' => 'BaWü', 'PostalCode' => '79098', 'CountryCode' => 'de', - ); - $expectedUserData = $this->convertAmazonToLocalAddress($amazonUserData, 1); - - $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); - $user->expects($this->once())->method('setAmazonShippingAddress')->with($this->callback( - function (\TdbDataExtranetUserAddress $userShippingAddress) use ($expectedUserData) { - if (false === $userShippingAddress->getIsAmazonShippingAddress()) { - return false; - }" -UpdateWithSelectedShippingAddress,"* amazon api ok, but user has not selected an address yet.","public function testGuestAmazonRemoteError() - { - $exception = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_API_ERROR); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails')->will($this->throwException($exception)); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - $basket = $this->getMockBuilder('TShopBasket')->getMock(); - $basket->expects($this->once())->method('getAmazonOrderReferenceId')->will($this->returnValue('AMAZON-ORDER-REF-ID')); - - $amazonPayment = new AmazonPayment($config); - - $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); - $user->expects($this->never())->method('setAmazonShippingAddress'); - - $exception = null; - try { - $amazonPayment->updateWithSelectedShippingAddress($basket, $user); - }" -UpdateWithSelectedShippingAddress,"* amazon api ok, but user has selected an address with in an unsupported country.","public function testGuestNoAddressSet() - { - $exception = new \TPkgCmsException_LogAndMessage(AmazonPayment::ERROR_CODE_NO_SHIPPING_ADDRESS); - - $amazonOrderRef = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->setConstructorArgs(array($this->getConfig(), 'AMAZON-ORDER-REF-ID'))->getMock(); - $amazonOrderRef->expects($this->once())->method('getOrderReferenceDetails')->will($this->throwException($exception)); - - $config = $this->getConfig(); - $config->expects($this->any())->method('amazonOrderReferenceObjectFactory')->with($this->equalTo('AMAZON-ORDER-REF-ID'))->will($this->returnValue($amazonOrderRef)); - - $basket = $this->getMockBuilder('TShopBasket')->getMock(); - $basket->expects($this->once())->method('getAmazonOrderReferenceId')->will($this->returnValue('AMAZON-ORDER-REF-ID')); - - $amazonPayment = new AmazonPayment($config); - - $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); - $user->expects($this->never())->method('setAmazonShippingAddress'); - - $exception = null; - try { - $amazonPayment->updateWithSelectedShippingAddress($basket, $user); - }" -AmazonPaymentGroupConfigTest,* @var \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"public function test_the_seller_authorization_note_without_capture() - { - $expected = 'Vielen Dank für Ihre Bestellung 12345 bei MEIN-SHOP'; - - $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); - $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); - $loader->load('sellerAuthorizationNote.xml'); - - $this->assertEquals($expected, $config->getSellerAuthorizationNote($this->order, 1.25, false)); - }" -AmazonPaymentGroupConfigTest,@var $mockOrder \TdbShopOrder|\PHPUnit_Framework_MockObject_MockObject,"public function test_the_seller_authorization_note_with_capture() - { - $expected = 'Vielen Dank für Ihre Bestellung 12345 bei MEIN-SHOP (mit capture now)'; - - $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); - $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); - $loader->load('sellerAuthorizationNote.xml'); - - $this->assertEquals($expected, $config->getSellerAuthorizationNote($this->order, 1, true)); - }" -AmazonPaymentGroupConfigTest,@var $shop \TdbShop|\PHPUnit_Framework_MockObject_MockObject,"public function test_get_seller_order_note() - { - $expected = 'Vielen Dank für Ihre Bestellung 12345 bei MEIN-SHOP'; - - $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); - $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); - $loader->load('sellerNote.xml'); - - $this->assertEquals($expected, $config->getSellerOrderNote($this->order)); - }" -AmazonPaymentGroupConfigTest,* @test,"public function test_get_soft_descriptor_with_no_invoice_number() - { - $expected = 'BNR 12345'; - - $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); - $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); - $loader->load('softDescriptor.xml'); - $this->assertEquals($expected, $config->getSoftDescriptor($this->order)); - }" -AmazonPaymentGroupConfigTest,* @test,"public function test_get_soft_descriptor_with_invoice_number() - { - $expected = 'RNR 123456789'; - - $config = new AmazonPaymentGroupConfig(\IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION); - $loader = new \TPkgShopPaymentGroupConfigXMLLoader($config, new FileLocator(AmazonPaymentFixturesFactory::getFixturePath('AmazonPaymentGroupConfig'))); - $loader->load('softDescriptor.xml'); - - $this->assertEquals($expected, $config->getSoftDescriptor($this->order, '123456789')); - }" -AmazonIPNHandler_AuthorizationTest,* expect the shop owner to be notified so he can take corrective action once the problem has been fixed (or when it is not fixed).,"public function test_Declined_with_InvalidPaymentMethod() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Declined-InvalidPaymentMethod.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Declined', 'InvalidPaymentMethod', 'There were problems with the payment method. You should contact your buyer and have them update their payment method using the Amazon Payments web site.'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,"* we could retry if the object is still open - but won't. - * we expect the shop owner to be notified so he can take corrective actions.","public function test_Declined_with_AmazonRejected() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Declined-AmazonRejected.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Declined', 'AmazonRejected', 'Amazon has rejected the authorization. You should only retry the authorization if the order reference is in the Open state.'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,"* the request should be called again - we currently don't have the necessary data, so inform the shop owner instead.","public function test_Declined_with_ProcessingFailure() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Declined-ProcessingFailure.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Declined', 'ProcessingFailure', 'Amazon could not process the transaction due to an internal processing error. You should only retry the authorization if the order reference is in the Open state.'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,* inform shop owner.,"public function test_Declined_with_TransactionTimedOut() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Declined-TransactionTimedOut.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Declined', 'TransactionTimedOut', 'foobar'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,* inform seller.,"public function test_Closed_with_ExpiredUnused() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-ExpiredUnused.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Closed', 'ExpiredUnused', 'The authorization has been in the Open state for 30 days (two days for Sandbox) and you did not submit any captures against it.'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,* inform seller.,"public function test_Closed_with_AmazonClosed() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-AmazonClosed.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Closed', 'AmazonClosed', 'Amazon has closed the authorization object due to problems with your account.'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,* do nothing.,"public function test_Closed_with_OrderReferenceCanceled() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-OrderReferenceCanceled.xml'), $this->idReferenceManager); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,* do nothing.,"public function test_Closed_with_SellerClosed() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-SellerClosed.xml'), $this->idReferenceManager); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,"* since we have the billing data for the user only after an auth has moved to the open state, we need to add this data to the order. - * note: the address is specific for every authorization - something that is not supported by our shop. if the shop is using - * payment on shipping, then we will generate the authorization after the invoice is created - so we may not have any use for the data at all - * however, that will be wawi specific. - * - * we expect the following - * * update the orders billing address with the data - * *","public function test_open() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Open.xml'), $this->idReferenceManager); - - /** @var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $orderRefObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->disableOriginalConstructor()->getMock(); - $getAuthorizationDetails = AmazonPaymentFixturesFactory::getAuthorizationDetails('success.xml'); - $orderRefObject->expects($this->once())->method('getAuthorizationDetails')->will( - $this->returnValue( - $getAuthorizationDetails->getGetAuthorizationDetailsResult()->getAuthorizationDetails() - ) - ); - - $this->getConfig()->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($orderRefObject)); - - $this->ipnHandler->setAmazonConfig($this->getConfig()); - - $this->ipnHandler->expects($this->once())->method('updateShopOrderBillingAddress')->with( - $this->equalTo($this->ipnRequest->getOrder()), - $this->equalTo( - array( - 'adr_billing_company' => 'ESONO AG', - 'adr_billing_salutation_id' => '', - 'adr_billing_firstname' => '', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_street' => 'Grünwälderstr. 10-14', - 'adr_billing_streetnr' => '', - 'adr_billing_city' => 'Freiburg', - 'adr_billing_postalcode' => '79098', - 'adr_billing_country_id' => '1', - 'adr_billing_telefon' => '', - 'adr_billing_fax' => '', - 'adr_billing_additional_info' => '', - ) - )); - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,@var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject,"public function test_Closed_with_MaxCapturesProcessed() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-MaxCapturesProcessed.xml'), $this->idReferenceManager); - - /** @var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $orderRefObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->disableOriginalConstructor()->getMock(); - $getAuthorizationDetails = AmazonPaymentFixturesFactory::getAuthorizationDetails('success.xml'); - $orderRefObject->expects($this->once())->method('getAuthorizationDetails')->will( - $this->returnValue( - $getAuthorizationDetails->getGetAuthorizationDetailsResult()->getAuthorizationDetails() - ) - ); - - $this->getConfig()->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($orderRefObject)); - $this->ipnHandler->setAmazonConfig($this->getConfig()); - - $this->ipnHandler->expects($this->once())->method('updateShopOrderBillingAddress')->with( - $this->equalTo($this->ipnRequest->getOrder()), - $this->equalTo( - array( - 'adr_billing_company' => 'ESONO AG', - 'adr_billing_salutation_id' => '', - 'adr_billing_firstname' => '', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_street' => 'Grünwälderstr. 10-14', - 'adr_billing_streetnr' => '', - 'adr_billing_city' => 'Freiburg', - 'adr_billing_postalcode' => '79098', - 'adr_billing_country_id' => '1', - 'adr_billing_telefon' => '', - 'adr_billing_fax' => '', - 'adr_billing_additional_info' => '', - ) - )); - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_AuthorizationTest,* expect billing address to be updated.,"public function test_Closed_with_MaxCapturesProcessed_on_AuthWithCapture() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Closed-MaxCapturesProcessed-CaptureNow.xml'), $this->idReferenceManager); - - /** @var $orderRefObject AmazonOrderReferenceObject|\PHPUnit_Framework_MockObject_MockObject */ - $orderRefObject = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\AmazonOrderReferenceObject')->disableOriginalConstructor()->getMock(); - $getAuthorizationDetails = AmazonPaymentFixturesFactory::getAuthorizationDetails('success.xml'); - $orderRefObject->expects($this->once())->method('getAuthorizationDetails')->will( - $this->returnValue( - $getAuthorizationDetails->getGetAuthorizationDetailsResult()->getAuthorizationDetails() - ) - ); - - $this->getConfig()->expects($this->any())->method('amazonOrderReferenceObjectFactory')->will($this->returnValue($orderRefObject)); - $this->ipnHandler->setAmazonConfig($this->getConfig()); - - $this->ipnHandler->expects($this->once())->method('updateShopOrderBillingAddress')->with( - $this->equalTo($this->ipnRequest->getOrder()), - $this->equalTo( - array( - 'adr_billing_company' => 'ESONO AG', - 'adr_billing_salutation_id' => '', - 'adr_billing_firstname' => '', - 'adr_billing_lastname' => 'Mr. Dev', - 'adr_billing_street' => 'Grünwälderstr. 10-14', - 'adr_billing_streetnr' => '', - 'adr_billing_city' => 'Freiburg', - 'adr_billing_postalcode' => '79098', - 'adr_billing_country_id' => '1', - 'adr_billing_telefon' => '', - 'adr_billing_fax' => '', - 'adr_billing_additional_info' => '', - ) - )); - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->ipnHandler->expects($this->never())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,* inform the shop owner.,"public function test_Declined_with_AmazonRejected() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Declined-AmazonRejected.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Declined', 'AmazonRejected', 'Amazon has rejected the capture. You should only retry the capture if the authorization is in the Open state.'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,* inform the shop owner.,"public function test_Declined_with_ProcessingFailure() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Declined-ProcessingFailure.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Declined', 'ProcessingFailure', 'Amazon could not process the transaction due to an internal processing error. You should only retry the capture if the authorization is in the Open state. Otherwise, you should request a new authorization and then call Capture on it.'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,* inform the shop owner.,"public function test_Closed_with_AmazonClosed() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Closed-AmazonClosed.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Closed', 'AmazonClosed', 'Amazon has closed the capture due to a problem with your account or with the buyer\'s account.'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,* confirms a capture created individually- so we expect the transaction to be marked as completed.,"public function test_Completed() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $transactionMock = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->returnValue($transactionMock)); - $this->ipnHandler->expects($this->once())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,* test a capture created via auth with CaptureNow in sync mode - so the transaction is already confirmed -nothing should happen.,"public function test_Completed_TransactionAlreadyMarkedAsConfirmed() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - /** @var $transactionMock \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $transactionMock = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $transactionMock->fieldConfirmed = true; - $transactionMock->sqlData['confirmed'] = '1'; - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->returnValue($transactionMock)); - $this->ipnHandler->expects($this->never())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,@var $transactionMock \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"public function test_Completed_TransactionNotFoundError() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); - - $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_TRANSACTION_NOT_FOUND); - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); - $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); - $this->ipnHandler->expects($this->never())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,* the IPN returned an orderIdManager that refers to a transaction Id that can not be found - so throw an error.,"public function test_Completed_TransactionInvalid() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); - - $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_TRANSACTION_DOES_NOT_MATCH_ORDER); - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); - $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); - $this->ipnHandler->expects($this->never())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,* the IPN returned an orderIdManager that refers to a transaction Id does not match the order.,"public function test_Completed_NoTransaction() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'), $this->idReferenceManager); - - $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_NO_TRANSACTION); - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); - $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); - $this->ipnHandler->expects($this->never())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,* the IPN does not match any transaction (or did not pass one).,"public function test_Closed_with_MaxAmountRefunded() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Closed-MaxAmountRefunded.xml'), $this->idReferenceManager); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_CaptureTest,* no action needs to be taken.,"public function test_Closed_with_MaxRefundsProcessed() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNCaptureNotification('Closed-MaxRefundsProcessed.xml'), $this->idReferenceManager); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_OrderReferenceNotificationTest,"* no action needs to be taken on open. So make sure, that no mail is sent.","public function test_open() - { - $this->helperAddIPNRequest( - AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Open.xml'), - $this->idReferenceManager - ); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->assertTrue($this->ipnHandler->handleIPN($this->ipnRequest)); - }" -AmazonIPNHandler_OrderReferenceNotificationTest,* no notification.,"public function test_Canceled_SellerCanceled() - { - $this->helperAddIPNRequest( - AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Canceled-SellerCanceled.xml'), - $this->idReferenceManager - ); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->assertTrue($this->ipnHandler->handleIPN($this->ipnRequest)); - }" -AmazonIPNHandler_OrderReferenceNotificationTest,* no notification.,"public function test_Closed_SellerClosed() - { - $this->helperAddIPNRequest( - AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Closed-SellerClosed.xml'), - $this->idReferenceManager - ); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $this->assertTrue($this->ipnHandler->handleIPN($this->ipnRequest)); - }" -AmazonIPNHandler_OrderReferenceNotificationTest,"* the order was marked as suspended via a decline from an auth IPN. when we receive an IPN, that it has reopened, - * we need to inform the shop owner, that he must take action.","public function test_Suspended_InvalidPaymentMethod() - { - $this->helperAddIPNRequest( - AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Suspended-InvalidPaymentMethod.xml'), - $this->idReferenceManager - ); - - $this->helperAddIPNMailObject('Suspended', 'InvalidPaymentMethod', 'There were problems with the payment method.'); - - $this->assertTrue($this->ipnHandler->handleIPN($this->ipnRequest)); - }" -AmazonIPNHandler_RefundTest,* inform the shop owner.,"public function test_Declined_with_AmazonRejected() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Declined-AmazonRejected.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Declined', 'AmazonRejected', 'Amazon has rejected the refund. You should issue a refund to the buyer in an alternate manner (for example, a gift card or store credit).'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_RefundTest,* inform the shop owner.,"public function test_Declined_with_ProcessingFailure() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Declined-ProcessingFailure.xml'), $this->idReferenceManager); - $this->helperAddIPNMailObject('Declined', 'ProcessingFailure', 'Amazon could not process the transaction due to an internal processing error or because the buyer has already received a refund from an A-to-z claim or a charge back. You should only retry the refund if the Capture object is in the Completed state. Otherwise, you should refund the buyer in an alternative way (for example, a store credit or a check).'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_RefundTest,* we expect the transaction to be marked as completed.,"public function test_Completed() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - $transactionMock = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->returnValue($transactionMock)); - $this->ipnHandler->expects($this->once())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_RefundTest,* we expect the transaction to be marked as completed.,"public function test_Completed_TransactionAlreadyMarkedAsConfirmed() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); - - $this->ipnHandler->expects($this->never())->method('getMailProfile'); - - /** @var $transactionMock \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject */ - $transactionMock = $this->getMockBuilder('TdbPkgShopPaymentTransaction')->disableOriginalConstructor()->getMock(); - $transactionMock->fieldConfirmed = true; - $transactionMock->sqlData['confirmed'] = '1'; - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->returnValue($transactionMock)); - $this->ipnHandler->expects($this->never())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_RefundTest,@var $transactionMock \TdbPkgShopPaymentTransaction|\PHPUnit_Framework_MockObject_MockObject,"public function test_Completed_TransactionNotFoundError() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); - - $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_TRANSACTION_NOT_FOUND); - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); - $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); - $this->ipnHandler->expects($this->never())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_RefundTest,* the IPN returned an orderIdManager that refers to a transaction Id that can not be found - so throw an error.,"public function test_Completed_TransactionInvalid() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); - - $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_TRANSACTION_DOES_NOT_MATCH_ORDER); - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); - $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); - $this->ipnHandler->expects($this->never())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonIPNHandler_RefundTest,* the IPN returned an orderIdManager that refers to a transaction Id does not match the order.,"public function test_Completed_NoTransaction() - { - $this->helperAddIPNRequest(AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'), $this->idReferenceManager); - - $exception = new AmazonIPNTransactionException(AmazonIPNTransactionException::ERROR_NO_TRANSACTION); - $this->ipnHandler->expects($this->once())->method('getTransactionFromRequest')->will($this->throwException($exception)); - $this->helperAddIPNMailObject('Completed', $exception->getErrorCodeAsString(), 'unable to find transaction matching IPN - details have been logged. '.(string) $exception); - $this->ipnHandler->expects($this->never())->method('confirmTransaction'); - - $this->ipnHandler->handleIPN($this->ipnRequest); - }" -AmazonPaymentExtranetUserTest,"* have a user with a real address set, but user is set to amazon payment user and has an amazon payment shipping address - * we expect the amazon shipping address to be returned.","public function testGetShippingAddress() - { - /** - * have a user with a real address set, but user is set to amazon payment user and has an amazon payment shipping address - * we expect the amazon shipping address to be returned. - */ - $amazonShippingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); - - $userList = $this->helperGetUser(); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonShippingAddressObject); - - $this->assertTrue($user->GetShippingAddress()->getIsAmazonShippingAddress()); - $this->assertEquals($amazonShippingAddressObject, $user->GetShippingAddress()); - $this->assertTrue($user->ShipToBillingAddress()); - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function testGetShippingAddressFromUserWithBillingNotEqualToShipping() - { - /** - * have a user with a real address set, but user is set to amazon payment user and has an amazon payment shipping address - * we expect the amazon shipping address to be returned. - */ - $amazonShippingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); - - $userList = $this->helperGetUser(true); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonShippingAddressObject); - - $this->assertTrue($user->ShipToBillingAddress()); - $this->assertTrue($user->GetShippingAddress()->getIsAmazonShippingAddress()); - $this->assertEquals($amazonShippingAddressObject->sqlData, $user->GetShippingAddress()->sqlData); - - $this->assertTrue($user->GetBillingAddress()->getIsAmazonShippingAddress()); - $this->assertEquals($amazonShippingAddressObject->sqlData, $user->GetBillingAddress()->sqlData); - }" -AmazonPaymentExtranetUserTest,"* have a user with a real address set, but user is set to amazon payment user and has an amazon payment shipping address - * we expect the amazon shipping address to be returned.","public function testHelperGetUser() - { - $userList = $this->helperGetUser(true); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - if ('noShippingAddress' === $type) { - continue; - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function testGetBillingAddressOfUserWithShippingEqualToBilling() - { - // change the shipping address data and expect the changed data to be returned, the user to remain in the - // amazon shipping user state, and the returned address not getting an id (ie not being saved) - $amazonShippingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); - - $userList = $this->helperGetUser(); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonShippingAddressObject); - - $this->assertEquals($amazonShippingAddressObject->sqlData, $user->GetBillingAddress()->sqlData); - $this->assertTrue($user->GetBillingAddress()->getIsAmazonShippingAddress()); - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function testUpdateShippingAddress() - { - // change the shipping address data and expect the changed data to be returned, the user to remain in the - // amazon shipping user state, and the returned address not getting an id (ie not being saved) - $amazonShippingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); - - $userList = $this->helperGetUser(); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonShippingAddressObject); - - $newShippingData = array( - 'company' => 'Amazon ESONO AG', - 'firstname' => '', - 'lastname' => 'Amazon Mr. Dev', - 'street' => 'Amazon Grünwälderstr 10-14', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '07611518280', - 'data_country_id' => '1', - ); - - $user->UpdateShippingAddress($newShippingData); - - $expectedShippingAdr = \TdbDataExtranetUserAddress::GetNewInstance($newShippingData); - - $this->assertEquals($expectedShippingAdr->sqlData, $user->GetShippingAddress()->sqlData); - $this->assertTrue($user->GetShippingAddress()->getIsAmazonShippingAddress()); - $this->assertNull($user->GetShippingAddress()->id); - - $this->assertTrue($user->isAmazonPaymentUser()); - }" -AmazonPaymentExtranetUserTest,@var \PHPUnit_Framework_MockObject_MockObject|\TdbDataExtranetUser $userWithLogin,"public function testUpdateBillingAddress() - { - // change the shipping address data and expect the changed data to be returned, the user to remain in the - // amazon shipping user state, and the returned address not getting an id (ie not being saved) - $amazonBillingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonBillingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonBillingAddressData); - - $userList = $this->helperGetUser(); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonBillingAddressObject); - - $newBillingData = array( - 'company' => 'Amazon ESONO AG', - 'firstname' => '', - 'lastname' => 'Amazon Mr. Dev', - 'street' => 'Amazon Grünwälderstr 10-14', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '07611518280', - 'data_country_id' => '1', - ); - - $user->UpdateBillingAddress($newBillingData); - - $expectedBillingAdr = \TdbDataExtranetUserAddress::GetNewInstance($newBillingData); - - $this->assertEquals($expectedBillingAdr->sqlData, $user->GetBillingAddress()->sqlData); - $this->assertTrue($user->GetBillingAddress()->getIsAmazonShippingAddress()); - $this->assertNull($user->GetBillingAddress()->id); - - $this->assertTrue($user->isAmazonPaymentUser()); - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function testSetAmazonPaymentEnabledToFalse() - { - /** - * we have a user with an amazon and a real shipping address. we expect the real shipping address being - * returned when changing the user to a non-amazon user. - */ - $amazonShippingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); - - $userList = $this->helperGetUser(); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonShippingAddressObject); - - $user->setAmazonPaymentEnabled(false); - $this->assertFalse($user->isAmazonPaymentUser()); - $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); - $this->assertEquals($expectedAddress->sqlData, $user->GetShippingAddress()->sqlData); - $this->assertTrue($user->ShipToBillingAddress()); - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function testSetAmazonPaymentEnabledToFalseAndFalseAgain() - { - $amazonShippingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); - - $userList = $this->helperGetUser(); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonShippingAddressObject); - - $user->setAmazonPaymentEnabled(false); - $this->assertFalse($user->isAmazonPaymentUser()); - $user->setAmazonPaymentEnabled(false); - $this->assertFalse($user->isAmazonPaymentUser()); - $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); - $this->assertEquals($expectedAddress->sqlData, $user->GetShippingAddress()->sqlData); - $this->assertTrue($user->ShipToBillingAddress()); - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function testSetAmazonPaymentEnabledNoneAmazonUserSetToTrueThenFalse() - { - $aUserData = array('login' => 'bla'); - $user = \TdbDataExtranetUser::GetNewInstance($aUserData); - - $type = 'noLogin'; - $adrExpected = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); - $user->UpdateShippingAddress($this->originalAddressData[$type]['shippingAddress']); - $user->UpdateBillingAddress($this->originalAddressData[$type]['shippingAddress']); - - $adr = $user->GetShippingAddress(); - - $user->setAmazonPaymentEnabled(true); - $this->assertEquals($adrExpected->sqlData, $adr->sqlData); - $this->assertTrue($user->isAmazonPaymentUser()); - - $adr = $user->GetShippingAddress(); - $user->setAmazonPaymentEnabled(false); - $this->assertFalse($user->isAmazonPaymentUser()); - $this->assertEquals($adrExpected->sqlData, $adr->sqlData); - $this->assertTrue($user->ShipToBillingAddress()); - }" -AmazonPaymentExtranetUserTest,"* we have a user with an amazon and a real shipping address. we expect the real shipping address being - * returned when changing the user to a non-amazon user.","public function testSetAmazonPaymentEnabledNoneAmazonUserSetToFalse() - { - $aUserData = array('login' => 'bla'); - $user = \TdbDataExtranetUser::GetNewInstance($aUserData); - - $type = 'noLogin'; - $adrExpected = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); - $user->UpdateShippingAddress($this->originalAddressData[$type]['shippingAddress']); - $user->UpdateBillingAddress($this->originalAddressData[$type]['shippingAddress']); - - $adr = $user->GetShippingAddress(); - - $user->setAmazonPaymentEnabled(false); - $this->assertEquals($adrExpected->sqlData, $adr->sqlData); - $this->assertFalse($user->isAmazonPaymentUser()); - $this->assertTrue($user->ShipToBillingAddress()); - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function testSetAmazonPaymentEnabledToFalseShippingNotBilling() - { - /** - * we have a user with an amazon and a real shipping address. we expect the real shipping address being - * returned when changing the user to a non-amazon user. - */ - $amazonShippingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); - - $userList = $this->helperGetUser(true); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonShippingAddressObject); - - $user->setAmazonPaymentEnabled(false); - $this->assertFalse($user->isAmazonPaymentUser()); - $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); - $this->assertEquals($expectedAddress->sqlData, $user->GetShippingAddress()->sqlData); - - $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['billingAddress']); - $this->assertEquals($expectedAddress->sqlData, $user->GetBillingAddress()->sqlData); - if ('noShippingAddress' === $type) { - $this->assertTrue($user->ShipToBillingAddress()); // users without a shipping address always have shipping = to billing - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function testSetAmazonPaymentEnabledToFalseAndFalseAgainShippingNotBilling() - { - $amazonShippingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); - - $userList = $this->helperGetUser(true); - /** @var \TdbDataExtranetUser $user */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonShippingAddressObject); - - $user->setAmazonPaymentEnabled(false); - $this->assertFalse($user->isAmazonPaymentUser()); - $user->setAmazonPaymentEnabled(false); - $this->assertFalse($user->isAmazonPaymentUser()); - $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); - $this->assertEquals($expectedAddress->sqlData, $user->GetShippingAddress()->sqlData); - - $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['billingAddress']); - $this->assertEquals($expectedAddress->sqlData, $user->GetBillingAddress()->sqlData); - if ('noShippingAddress' === $type) { - $this->assertTrue($user->ShipToBillingAddress()); // users without a shipping address always have shipping = to billing - }" -AmazonPaymentExtranetUserTest,"* we have a user with an amazon and a real shipping address. we expect the real shipping address being - * returned when changing the user to a non-amazon user.","public function testSetAmazonPaymentEnabledNoneAmazonUserSetToTrueThenFalseShippingNotBilling() - { - $aUserData = array('login' => 'bla'); - $user = \TdbDataExtranetUser::GetNewInstance($aUserData); - - $type = 'noLogin'; - $adrExpected = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); - $user->UpdateShippingAddress($this->originalAddressData[$type]['shippingAddress']); - - $adr = $user->GetShippingAddress(); - - $user->setAmazonPaymentEnabled(true); - $this->assertEquals($adrExpected->sqlData, $adr->sqlData); - $this->assertTrue($user->isAmazonPaymentUser()); - - $adr = $user->GetShippingAddress(); - $user->setAmazonPaymentEnabled(false); - $this->assertFalse($user->isAmazonPaymentUser()); - $this->assertEquals($adrExpected->sqlData, $adr->sqlData); - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function testSetAmazonPaymentEnabledNoneAmazonUserSetToFalseShippingNotBilling() - { - $aUserData = array('login' => 'bla'); - $user = \TdbDataExtranetUser::GetNewInstance($aUserData); - - $type = 'noLogin'; - $adrExpected = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); - $user->UpdateShippingAddress($this->originalAddressData[$type]['shippingAddress']); - - $adr = $user->GetShippingAddress(); - - $user->setAmazonPaymentEnabled(false); - $this->assertEquals($adrExpected->sqlData, $adr->sqlData); - $this->assertFalse($user->isAmazonPaymentUser()); - }" -AmazonPaymentExtranetUserTest,@var \TdbDataExtranetUser $user,"public function it_is_serialized_and_unserialzed() - { - // test to make sure the user data survives serialization - $userList = $this->helperGetUser(true); - $amazonShippingAddressData = array( - 'company' => '', - 'firstname' => '', - 'lastname' => '', - 'street' => '', - 'streetnr' => '', - 'city' => 'Freiburg', - 'postalcode' => '79098', - 'telefon' => '', - 'data_country_id' => '1', - ); - $amazonShippingAddressObject = \TdbDataExtranetUserAddress::GetNewInstance($amazonShippingAddressData); - - /** @var $user \TdbDataExtranetUser */ - foreach ($userList as $type => $user) { - $user->setAmazonPaymentEnabled(true); - $user->setAmazonShippingAddress($amazonShippingAddressObject); - $seralized = serialize($user); - /** @var $unseralizedUser \TdbDataExtranetUser */ - $unseralizedUser = unserialize($seralized); - - $this->assertTrue($unseralizedUser->isAmazonPaymentUser()); - $this->assertEquals($amazonShippingAddressObject, $unseralizedUser->GetShippingAddress()); - - // now change to non amazon mode to check if the original billing/shipping survived the serialization - - $unseralizedUser->setAmazonPaymentEnabled(false); - $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['shippingAddress']); - $this->assertEquals($expectedAddress->sqlData, $unseralizedUser->GetShippingAddress()->sqlData); - - $expectedAddress = \TdbDataExtranetUserAddress::GetNewInstance($this->originalAddressData[$type]['billingAddress']); - $this->assertEquals($expectedAddress->sqlData, $unseralizedUser->GetBillingAddress()->sqlData); - if ('noShippingAddress' === $type) { - $this->assertTrue($unseralizedUser->ShipToBillingAddress()); // users without a shipping address always have shipping = to billing - }" -AmazonPaymentBasketTest,* @test,"public function it_set_the_order_reference_id() - { - // we expect the basket to have an order reference id, and we expect an instance of the extranet user passed to be activated as an amazon user - $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); - $user->expects($this->once())->method('setAmazonPaymentEnabled')->with($this->equalTo(true)); - - /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ - $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails'))->getMock(); - $basket->expects($this->once())->method('updateAmazonOrderReferenceDetails'); - $basket->setAmazonOrderReferenceId('35985468546954', $user); - - $this->assertEquals('35985468546954', $basket->getAmazonOrderReferenceId()); - }" -AmazonPaymentBasketTest,@var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject,"public function it_resets_the_order_reference_id() - { - // we expect the basket to have an order reference id, and we expect an instance of the extranet user passed to be activated as an amazon user - $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); - $user->expects($this->once())->method('setAmazonPaymentEnabled')->with($this->equalTo(false)); - - /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ - $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails'))->getMock(); - $basket->expects($this->never())->method('updateAmazonOrderReferenceDetails'); - - $basket->setAmazonOrderReferenceId(null, $user); - - $this->assertEquals(null, $basket->getAmazonOrderReferenceId()); - }" -AmazonPaymentBasketTest,* @test,"public function it_is_serialized_and_unserialzed() - { - // we expect the basket to have an order reference id, and we expect an instance of the extranet user passed to be activated as an amazon user - $user = $this->getMockBuilder('TdbDataExtranetUser')->disableOriginalConstructor()->getMock(); - $user->expects($this->once())->method('setAmazonPaymentEnabled')->with($this->equalTo(true)); - $prop = new \ReflectionProperty('\ChameleonSystem\AmazonPaymentBundle\pkgShop\AmazonPaymentBasket', 'amazonOrderReferenceValue'); - $prop->setAccessible(true); - - /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ - $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails'))->getMock(); - $basket->expects($this->once())->method('updateAmazonOrderReferenceDetails'); - - $basket->setAmazonOrderReferenceId('35985468546954', $user); - $prop->setValue($basket, '12345'); - - $seralize = serialize($basket); - $unseralizedBasket = unserialize($seralize); - - $this->assertEquals('35985468546954', $unseralizedBasket->getAmazonOrderReferenceId()); - $this->assertEquals('12345', $prop->getValue($unseralizedBasket)); - - // check that the orderRefValue sent to amazon was also recovered - }" -AmazonPaymentBasketTest,@var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject,"public function test_basket_value_changed_on_basket_without_amazon_order_reference_id() - { - /** @var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ - $newItem = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); - $newItem->dProductPrice = 10; - $newItem->dAmount = 1; - $newItem->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); - - /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ - $basket = $this->getMockBuilder('\TShopBasket')->disableOriginalConstructor()->setMethods(array('updateAmazonOrderReferenceDetails', 'SetBasketRecalculationFlag', 'ResetAllShippingMarkers', 'RecalculateDiscounts', 'RecalculateNoneSponsoredVouchers', 'RecalculateShipping', 'CalculatePaymentMethodCosts', 'RecalculateVAT', 'RecalculateVouchers'))->getMock(); - $basket->expects($this->never())->method('updateAmazonOrderReferenceDetails'); - $basket->AddItem($newItem); - $basket->RecalculateBasket(); - }" -AmazonPaymentBasketTest,* @test,"public function test_basket_value_changed_first_time_on_basket_with_amazon_order_reference_id() - { - /** @var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ - $newItem = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); - $newItem->dProductPrice = 10; - $newItem->dAmount = 1; - $newItem->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); - - $userMock = $this->getMockBuilder('TdbDataExtranetUser')->getMock(); - /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ - $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails', 'SetBasketRecalculationFlag', 'ResetAllShippingMarkers', 'RecalculateDiscounts', 'RecalculateNoneSponsoredVouchers', 'RecalculateShipping', 'CalculatePaymentMethodCosts', 'RecalculateVAT', 'RecalculateVouchers'))->getMock(); - $basket->setAmazonOrderReferenceId('ORDER-REF-ID', $userMock); - - $basket->expects($this->once())->method('updateAmazonOrderReferenceDetails'); - $basket->AddItem($newItem); - $basket->RecalculateBasket(); - }" -AmazonPaymentBasketTest,@var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject,"public function test_basket_value_changed_second_time_on_basket_with_amazon_order_reference_id() - { - /** @var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ - $newItem = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); - $newItem->sBasketItemKey = '1'; - $newItem->dProductPrice = 10; - $newItem->dPriceTotal = 10; - $newItem->dAmount = 1; - $newItem->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); - /** @var $newItem2 \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ - $newItem2 = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); - $newItem2->sBasketItemKey = '2'; - $newItem2->dProductPrice = 15; - $newItem2->dPriceTotal = 15; - $newItem2->dAmount = 1; - $newItem2->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); - - $userMock = $this->getMockBuilder('TdbDataExtranetUser')->getMock(); - /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ - $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails', 'SetBasketRecalculationFlag', 'ResetAllShippingMarkers', 'RecalculateDiscounts', 'RecalculateNoneSponsoredVouchers', 'RecalculateShipping', 'CalculatePaymentMethodCosts', 'RecalculateVAT', 'RecalculateVouchers'))->getMock(); - $basket->setAmazonOrderReferenceId('ORDER-REF-ID', $userMock); - - $basket->expects($this->exactly(2))->method('updateAmazonOrderReferenceDetails'); - $basket->AddItem($newItem); - $basket->RecalculateBasket(); - $basket->dCostTotal = $basket->dCostTotal + 10; - $basket->AddItem($newItem2); - $basket->RecalculateBasket(); - }" -AmazonPaymentBasketTest,@var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject,"public function test_recalculate_without_value_change_on_basket_with_amazon_order_reference_id() - { - /** @var $newItem \TShopBasketArticle|\PHPUnit_Framework_MockObject_MockObject */ - $newItem = $this->getMockBuilder('\TShopBasketArticle')->disableOriginalConstructor()->getMock(); - $newItem->sBasketItemKey = '1'; - $newItem->dProductPrice = 10; - $newItem->dAmount = 1; - $newItem->expects($this->any())->method('IsBuyable')->will($this->returnValue(true)); - - $userMock = $this->getMockBuilder('TdbDataExtranetUser')->getMock(); - /** @var $basket \TShopBasket|\PHPUnit_Framework_MockObject_MockObject */ - $basket = $this->getMockBuilder('\TShopBasket')->setMethods(array('updateAmazonOrderReferenceDetails', 'SetBasketRecalculationFlag', 'ResetAllShippingMarkers', 'RecalculateDiscounts', 'RecalculateNoneSponsoredVouchers', 'RecalculateShipping', 'CalculatePaymentMethodCosts', 'RecalculateVAT', 'RecalculateVouchers'))->getMock(); - $basket->setAmazonOrderReferenceId('ORDER-REF-ID', $userMock); - - $basket->expects($this->once())->method('updateAmazonOrderReferenceDetails'); - $basket->AddItem($newItem); - $basket->RecalculateBasket(); - $basket->RecalculateBasket(); - }" -ProcessRawRequestDataTest,"* we expect - * 1. an OffAmazonPaymentsNotifications_Model_OrderReferenceNotification Object - * 2. an IPN Manager loaded via the order AmazonOrderReferenceId - * 3. no localId.","public function test_order_reference_ipn() - { - $request = AmazonPaymentFixturesFactory::getIPNRequest('OrderReferenceNotification.post'); - $expectedIPNObject = AmazonPaymentFixturesFactory::getIPNOrderReferenceNotification('Open.xml'); - $this->helperStubIPNApi($request, $expectedIPNObject); - - $expectedIdManager = new AmazonReferenceIdManager('AMAZON-ORDER-REFERENCE', 'SOME-SHOP-ORDER-ID'); - - //amazonOrderReferenceObjectFactory - $this->getConfig()->expects($this->once())->method('amazonReferenceIdManagerFactory') - ->with($this->anything(), $this->equalTo(AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_AMAZON_ORDER_REFERENCE_ID), $this->equalTo('AMAZON-ORDER-REFERENCE')) - ->will($this->returnValue($expectedIdManager)); - - /** @var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject */ - $payment = $this->helperGetPaymentGroupHandler($request); - - $rawData = $payment->processRawRequestData(array()); - - $this->assertTrue(isset($rawData['amazonNotificationObject']), 'no amazonNotificationObject'); - $this->assertTrue(isset($rawData['amazonReferenceIdManager']), 'no amazonReferenceIdManager'); - $this->assertFalse(isset($rawData['amazonLocalReferenceId']), 'there should not be a amazonLocalReferenceId'); - - $this->assertEquals($expectedIPNObject, $rawData['amazonNotificationObject']); - $this->assertEquals($expectedIdManager, $rawData['amazonReferenceIdManager']); - }" -ProcessRawRequestDataTest,@var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject,"public function test_authorization_ipn() - { - $request = AmazonPaymentFixturesFactory::getIPNRequest('AuthorizationNotification.post'); - $expectedIPNObject = AmazonPaymentFixturesFactory::getIPNAuthorizationNotification('Open.xml'); - $this->helperStubIPNApi($request, $expectedIPNObject); - - $expectedId = new AmazonReferenceId(AmazonReferenceId::TYPE_AUTHORIZE, 'AUTH-REF-ID', 12.23, null); - /** @var $expectedIdManager AmazonReferenceIdManager|PHPUnit_Framework_MockObject_MockObject */ - $expectedIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->setConstructorArgs(array('AMAZON-ORDER-REFERENCE', 'SOME-SHOP-ORDER-ID'))->getMock(); - $expectedIdManager->expects($this->any())->method('findFromLocalReferenceId')->with($this->equalTo('AUTH-REF-ID'), $this->equalTo(IAmazonReferenceId::TYPE_AUTHORIZE))->will($this->returnValue($expectedId)); - - //amazonOrderReferenceObjectFactory - $this->getConfig()->expects($this->once())->method('amazonReferenceIdManagerFactory') - ->with($this->anything(), $this->equalTo(AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID), $this->equalTo('AUTH-REF-ID')) - ->will($this->returnValue($expectedIdManager)); - - /** @var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject */ - $payment = $this->helperGetPaymentGroupHandler($request); - - $rawData = $payment->processRawRequestData(array()); - - $this->assertTrue(isset($rawData['amazonNotificationObject']), 'no amazonNotificationObject'); - $this->assertTrue(isset($rawData['amazonReferenceIdManager']), 'no amazonReferenceIdManager'); - $this->assertTrue(isset($rawData['amazonLocalReferenceId']), 'no amazonLocalReferenceId'); - - $this->assertEquals($expectedIPNObject, $rawData['amazonNotificationObject']); - $this->assertEquals($expectedIdManager, $rawData['amazonReferenceIdManager']); - $this->assertEquals($expectedId, $rawData['amazonLocalReferenceId']); - }" -ProcessRawRequestDataTest,"* we expect - * 1. an OffAmazonPaymentsNotifications_Model_AuthorizationNotification Object - * 2. an IPN Manager loaded via the order AuthorizationReferenceId - * note: it does not matter if the request was synchronous or not or if it was in combination with a capture now.","public function test_capture_ipn() - { - $request = AmazonPaymentFixturesFactory::getIPNRequest('CaptureNotification.post'); - $expectedIPNObject = AmazonPaymentFixturesFactory::getIPNCaptureNotification('Completed.xml'); - $this->helperStubIPNApi($request, $expectedIPNObject); - - $expectedId = new AmazonReferenceId(AmazonReferenceId::TYPE_CAPTURE, 'AMAZON-CAPTURE-REFERENCE-ID', 12.23, '12345'); - /** @var $expectedIdManager AmazonReferenceIdManager|PHPUnit_Framework_MockObject_MockObject */ - $expectedIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->setConstructorArgs(array('AMAZON-ORDER-REFERENCE', 'SOME-SHOP-ORDER-ID'))->getMock(); - $expectedIdManager->expects($this->any())->method('findFromLocalReferenceId')->with($this->equalTo('AMAZON-CAPTURE-REFERENCE-ID'), $this->equalTo(IAmazonReferenceId::TYPE_CAPTURE))->will($this->returnValue($expectedId)); - - //amazonOrderReferenceObjectFactory - $this->getConfig()->expects($this->once())->method('amazonReferenceIdManagerFactory') - ->with($this->anything(), $this->equalTo(AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID), $this->equalTo('AMAZON-CAPTURE-REFERENCE-ID')) - ->will($this->returnValue($expectedIdManager)); - - /** @var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject */ - $payment = $this->helperGetPaymentGroupHandler($request); - - $rawData = $payment->processRawRequestData(array()); - - $this->assertTrue(isset($rawData['amazonNotificationObject']), 'no amazonNotificationObject'); - $this->assertTrue(isset($rawData['amazonReferenceIdManager']), 'no amazonReferenceIdManager'); - $this->assertTrue(isset($rawData['amazonLocalReferenceId']), 'no amazonLocalReferenceId'); - - $this->assertEquals($expectedIPNObject, $rawData['amazonNotificationObject']); - $this->assertEquals($expectedIdManager, $rawData['amazonReferenceIdManager']); - $this->assertEquals($expectedId, $rawData['amazonLocalReferenceId']); - }" -ProcessRawRequestDataTest,@var $expectedIdManager AmazonReferenceIdManager|PHPUnit_Framework_MockObject_MockObject,"public function test_refund_ipn() - { - $request = AmazonPaymentFixturesFactory::getIPNRequest('RefundNotification.post'); - $expectedIPNObject = AmazonPaymentFixturesFactory::getIPNRefundNotification('Completed.xml'); - $this->helperStubIPNApi($request, $expectedIPNObject); - - // the local id may be known - or not - $expectedId = new AmazonReferenceId(AmazonReferenceId::TYPE_REFUND, 'REFUND-REFERENCE-ID', 12.23, null); - /** @var $expectedIdManager AmazonReferenceIdManager|PHPUnit_Framework_MockObject_MockObject */ - $expectedIdManager = $this->getMockBuilder('\ChameleonSystem\AmazonPaymentBundle\ReferenceIdMapping\AmazonReferenceIdManager')->setConstructorArgs(array('AMAZON-ORDER-REFERENCE', 'SOME-SHOP-ORDER-ID'))->getMock(); - $expectedIdManager->expects($this->any())->method('findFromLocalReferenceId')->with($this->equalTo('REFUND-REFERENCE-ID'), $this->equalTo(IAmazonReferenceId::TYPE_REFUND))->will($this->returnValue($expectedId)); - - //amazonOrderReferenceObjectFactory - $this->getConfig()->expects($this->once())->method('amazonReferenceIdManagerFactory') - ->with($this->anything(), $this->equalTo(AmazonPaymentGroupConfig::AMAZON_REFERENCE_ID_MANAGER_FACTORY_TYPE_LOCAL_ID), $this->equalTo('REFUND-REFERENCE-ID')) - ->will($this->returnValue($expectedIdManager)); - - /** @var $payment AmazonShopPaymentHandlerGroup|PHPUnit_Framework_MockObject_MockObject */ - $payment = $this->helperGetPaymentGroupHandler($request); - - $rawData = $payment->processRawRequestData(array()); - - $this->assertTrue(isset($rawData['amazonNotificationObject']), 'no amazonNotificationObject'); - $this->assertTrue(isset($rawData['amazonReferenceIdManager']), 'no amazonReferenceIdManager'); - $this->assertTrue(isset($rawData['amazonLocalReferenceId']), 'no amazonLocalReferenceId'); - - $this->assertEquals($expectedIPNObject, $rawData['amazonNotificationObject']); - $this->assertEquals($expectedIdManager, $rawData['amazonReferenceIdManager']); - $this->assertEquals($expectedId, $rawData['amazonLocalReferenceId']); - }" -AmazonReferenceIdManagerPersistenceTest,* @var \PDO,"public function test_persist() - { - $manager = new AmazonReferenceIdManager($this->amazonOrderReferenceId, $this->orderId); - - $auth1 = $manager->createLocalAuthorizationReferenceIdWithCaptureNow(IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS, 7.00, null); - $auth1->setAmazonId('MY-AMAZON-ID'); - $auth2 = $manager->createLocalAuthorizationReferenceId(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS, 8.00, 'transactionId'); - $capture1 = $manager->createLocalCaptureReferenceId(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS, $auth1->getLocalId(), 9.00, 'transactionId2'); - $refund = $manager->createLocalRefundReferenceId(10.00, 'transactionId3'); - - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - $manager->persist($dbal); - - // then load and check if equal - - $new = AmazonReferenceIdManager::createFromShopOrderId($dbal, $this->orderId); - - $this->assertEquals($manager, $new); - - $new->delete($dbal); - - // should only contain one record - $remaining = $dbal->fetchAllAssociative('SELECT id, local_id, shop_order_id,amazon_order_reference_id, amazon_id, value, type, capture_now, request_mode, pkg_shop_payment_transaction_id FROM '.self::AMAZON_ID_MANAGER_TABLE); - $expected = array( - array( - 'id' => '1234567890', - 'local_id' => 'NOT-RELATED', - 'shop_order_id' => 'NOT-RELATED-ORDER', - 'amazon_order_reference_id' => 'SOME-ORDER-REF-NOT-RELATED', - 'amazon_id' => 'SOME-UNRELATED-AUTH-ID', - 'value' => 200.00, - 'type' => '1', - 'capture_now' => '0', - 'request_mode' => '1', - 'pkg_shop_payment_transaction_id' => 'NOT-RELATED-TRANSACTION-ID', - ), - ); - $this->assertEquals($expected, $remaining); - }" -AmazonReferenceIdManagerPersistenceTest,@var $item AmazonReferenceId,"public function test_load_from_row_and_find_from_local_id() - { - $expected = array(); - $source = array(); - - $source[] = array( - 'id' => '1', - 'shop_order_id' => 'ORDERID', - 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', - 'local_id' => 'AUTH-1', - 'amazon_id' => 'AMAZON-AUTH-1', - 'value' => 100, - 'type' => '1', - 'request_mode' => '1', - 'capture_now' => '0', - 'pkg_shop_payment_transaction_id' => '', - ); - $item = new AmazonReferenceId(AmazonReferenceId::TYPE_AUTHORIZE, 'AUTH-1', 100, null); - $item->setAmazonId('AMAZON-AUTH-1'); - $item->setCaptureNow(false); - $item->setRequestMode(AmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); - $expected[] = $item; - - $source[] = array( - 'id' => '2', - 'shop_order_id' => 'ORDERID', - 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', - 'local_id' => 'AUTH-2', - 'amazon_id' => 'AMAZON-AUTH-2', - 'value' => 50, - 'type' => '1', - 'request_mode' => '2', - 'capture_now' => '1', - 'pkg_shop_payment_transaction_id' => 'TRANSACTIONID', - ); - $item = new AmazonReferenceId(AmazonReferenceId::TYPE_AUTHORIZE, 'AUTH-2', 50, 'TRANSACTIONID'); - $item->setAmazonId('AMAZON-AUTH-2'); - $item->setCaptureNow(true); - $item->setRequestMode(AmazonReferenceId::REQUEST_MODE_SYNCHRONOUS); - $expected[] = $item; - - $source[] = array( - 'id' => '3', - 'shop_order_id' => 'ORDERID', - 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', - 'local_id' => 'CAPTURE-1', - 'amazon_id' => 'AMAZON-CAPTURE-1', - 'value' => 80, - 'type' => '2', - 'request_mode' => '', - 'capture_now' => '0', - 'pkg_shop_payment_transaction_id' => '', - ); - $item = new AmazonReferenceId(AmazonReferenceId::TYPE_CAPTURE, 'CAPTURE-1', 80, null); - $item->setAmazonId('AMAZON-CAPTURE-1'); - $item->setCaptureNow(false); - $item->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); - $expected[] = $item; - - $source[] = array( - 'id' => '4', - 'shop_order_id' => 'ORDERID', - 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', - 'local_id' => 'AUTH-2', - 'amazon_id' => 'AMAZON-CAPTURE-2', - 'value' => 50, - 'type' => '2', - 'request_mode' => '', - 'capture_now' => '0', - 'pkg_shop_payment_transaction_id' => 'TRANSACTIONID', - ); - $item = new AmazonReferenceId(AmazonReferenceId::TYPE_CAPTURE, 'AUTH-2', 50, 'TRANSACTIONID'); - $item->setAmazonId('AMAZON-CAPTURE-2'); - $item->setCaptureNow(false); - $item->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); - $expected[] = $item; - - $source[] = array( - 'id' => '5', - 'shop_order_id' => 'ORDERID', - 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', - 'local_id' => 'REFUND-1', - 'amazon_id' => 'AMAZON-REFUND-1', - 'value' => 10, - 'type' => '3', - 'request_mode' => '', - 'capture_now' => '0', - 'pkg_shop_payment_transaction_id' => '', - ); - $item = new AmazonReferenceId(AmazonReferenceId::TYPE_REFUND, 'REFUND-1', 10, null); - $item->setAmazonId('AMAZON-REFUND-1'); - $item->setCaptureNow(false); - $item->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); - $expected[] = $item; - - $source[] = array( - 'id' => '6', - 'shop_order_id' => 'ORDERID', - 'amazon_order_reference_id' => 'AMAZON-ORDER-REF', - 'local_id' => 'REFOUND-2', - 'amazon_id' => 'AMAZON-REFOUND-2', - 'value' => 20, - 'type' => '3', - 'request_mode' => '', - 'capture_now' => '0', - 'pkg_shop_payment_transaction_id' => '', - ); - $item = new AmazonReferenceId(AmazonReferenceId::TYPE_REFUND, 'REFOUND-2', 20, null); - $item->setAmazonId('AMAZON-REFOUND-2'); - $item->setCaptureNow(false); - $item->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); - $expected[] = $item; - - $manager = AmazonReferenceIdManager::createFromRecordList($source); - - /** @var $item AmazonReferenceId */ - foreach ($expected as $item) { - $find = $manager->findFromLocalReferenceId($item->getLocalId(), $item->getType()); - $this->assertEquals($item, $find, 'expected '.print_r($item, true).""\nbut got\n"".print_r($find, true)); - }" -AmazonReferenceIdManagerPersistenceTest,@var $manager AmazonReferenceIdManager,"public function test_load_from_shop_order_id() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromShopOrderId($dbal, $this->orderId); - - // expecting 2 entries - - $expectedA = new AmazonReferenceId(IAmazonReferenceId::TYPE_AUTHORIZE, '1234', 400, 'fdgksfkhjsfhjfgh'); - $expectedA->setAmazonId('57675465465'); - $expectedA->setCaptureNow(false); - $expectedA->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); - - $expectedB = new AmazonReferenceId(IAmazonReferenceId::TYPE_CAPTURE, '2234', 300, 'fdgksfkhjsxxx'); - $expectedB->setAmazonId('545665465465'); - $expectedB->setCaptureNow(false); - $expectedB->setRequestMode(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS); - - $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); - - $foundA = $manager->findFromLocalReferenceId('1234', IAmazonReferenceId::TYPE_AUTHORIZE); - $this->assertEquals($expectedA, $foundA); - - $foundB = $manager->findFromLocalReferenceId('2234', IAmazonReferenceId::TYPE_CAPTURE); - $this->assertEquals($expectedB, $foundB); - }" -AmazonReferenceIdManagerPersistenceTest,* @expectedException \InvalidArgumentException,"public function test_load_from_shop_order_id_not_found() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromShopOrderId($dbal, 'NOTFOUND'); - }" -AmazonReferenceIdManagerPersistenceTest,@var $manager AmazonReferenceIdManager,"public function test_load_from_order_reference_id() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromOrderReferenceId($dbal, 'S02-1974231-0772375'); - - // expecting 2 entries - - $expectedA = new AmazonReferenceId(IAmazonReferenceId::TYPE_AUTHORIZE, '1234', 400, 'fdgksfkhjsfhjfgh'); - $expectedA->setAmazonId('57675465465'); - - $expectedB = new AmazonReferenceId(IAmazonReferenceId::TYPE_CAPTURE, '2234', 300, 'fdgksfkhjsxxx'); - $expectedB->setAmazonId('545665465465'); - - $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); - - $foundA = $manager->findFromLocalReferenceId('1234', IAmazonReferenceId::TYPE_AUTHORIZE); - $this->assertEquals($expectedA, $foundA); - - $foundB = $manager->findFromLocalReferenceId('2234', IAmazonReferenceId::TYPE_CAPTURE); - $this->assertEquals($expectedB, $foundB); - }" -AmazonReferenceIdManagerPersistenceTest,@var $manager AmazonReferenceIdManager,"public function test_load_from_order_reference_id_not_found() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromOrderReferenceId($dbal, 'NOTFOUND'); - }" -AmazonReferenceIdManagerPersistenceTest,* @expectedException \InvalidArgumentException,"public function test_load_from_authorization_reference_id() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromLocalId($dbal, '2234'); - $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); - - $expected = $this->helperGetExpectedItemList(); - foreach ($expected as $expectedData) { - $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); - $this->assertEquals($expectedData['object'], $found); - }" -AmazonReferenceIdManagerPersistenceTest,@var $manager AmazonReferenceIdManager,"public function test_load_from_capture_now_authorization_reference_id() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromLocalId($dbal, 'AUTH-WITH-CAPTURE-NOW'); - $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); - - $expected = $this->helperGetExpectedItemList(); - foreach ($expected as $expectedData) { - $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); - $this->assertEquals($expectedData['object'], $found); - }" -AmazonReferenceIdManagerPersistenceTest,"* returns items in before.yml that match our sample order. - * - * @return array","public function test_load_from_capture_reference_id() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromLocalId($dbal, '2234'); - $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); - - $expected = $this->helperGetExpectedItemList(); - foreach ($expected as $expectedData) { - $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); - $this->assertEquals($expectedData['object'], $found); - }" -AmazonReferenceIdManagerPersistenceTest,@var $manager AmazonReferenceIdManager,"public function test_load_from_capture_now_capture_reference_id() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromLocalId($dbal, 'AUTH-WITH-CAPTURE-NOW'); - $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); - - $expected = $this->helperGetExpectedItemList(); - foreach ($expected as $expectedData) { - $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); - $this->assertEquals($expectedData['object'], $found); - }" -AmazonReferenceIdManagerPersistenceTest,@var $manager AmazonReferenceIdManager,"public function test_load_from_refund_reference_id() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromLocalId($dbal, 'REFUND-REF-ID'); - $this->assertEquals($this->amazonOrderReferenceId, $manager->getAmazonOrderReferenceId()); - - $expected = $this->helperGetExpectedItemList(); - foreach ($expected as $expectedData) { - $found = $manager->findFromLocalReferenceId($expectedData['localid'], $expectedData['type']); - $this->assertEquals($expectedData['object'], $found); - }" -AmazonReferenceIdManagerPersistenceTest,@var $manager AmazonReferenceIdManager,"public function test_load_from_local_not_found() - { - $dbal = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_mysql', 'pdo' => self::$pdo, 'charset' => 'UTF8')); - - /** @var $manager AmazonReferenceIdManager */ - $manager = AmazonReferenceIdManager::createFromLocalId($dbal, '223454545'); - }" -AmazonReferenceIdManagerPersistenceTest,@var $manager AmazonReferenceIdManager,"public function getConnection() - { - if (null === $this->conn) { - $this->conn = $this->createDefaultDBConnection(self::$pdo, ':memory:'); - }" -AmazonReferenceIdManagerPersistenceTest,@var $manager AmazonReferenceIdManager,"public function getDataSet() - { - return new \PHPUnit_Extensions_Database_DataSet_YamlDataSet( - dirname(__FILE__).'/../fixtures/ReferenceIdMapping/before.yml' - ); - }" -AmazonReferenceIdManagerTest,@var IAmazonReferenceId $item,"public function test_create_and_search_new_authorization_reference_id_in_sync_and_asyn_mode() - { - $testRequestMode = array(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS, IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS); - foreach ($testRequestMode as $requestMode) { - $manager = new AmazonReferenceIdManager($this->amazonOrderReferenceId, $this->orderId); - $value = 10; - $transactionId = null; - /** @var IAmazonReferenceId $item */ - $item = $manager->createLocalAuthorizationReferenceId($requestMode, $value, $transactionId); - - $this->assertEquals($value, $item->getValue()); - $this->assertEquals($transactionId, $item->getTransactionId()); - $this->assertEquals($requestMode, $item->getRequestMode(), 'expecting request mode '.$requestMode); - $this->assertEquals(IAmazonReferenceId::TYPE_AUTHORIZE, $item->getType()); - $localId = $item->getLocalId(); - $this->assertFalse(empty($localId)); - - // make sure the item is really in the manager - - $itemInManager = $manager->findFromLocalReferenceId($localId, IAmazonReferenceId::TYPE_AUTHORIZE); - - $this->assertEquals($item, $itemInManager); - }" -AmazonReferenceIdManagerTest,@var IAmazonReferenceId $item,"public function test_consecutive_find_from_local_reference_calls() - { - $manager = $this->fixtureGetManagerWithData(); - - $localRefund = $manager->findFromLocalReferenceId('REFOUND-2', IAmazonReferenceId::TYPE_REFUND); - $localAuth = $manager->findFromLocalReferenceId('AUTH-1', IAmazonReferenceId::TYPE_AUTHORIZE); - - $localRefundAgain = $manager->findFromLocalReferenceId('REFOUND-2', IAmazonReferenceId::TYPE_REFUND); - - $this->assertEquals($localRefund, $localRefundAgain); - $this->assertEquals('REFOUND-2', $localRefund->getLocalId()); - $this->assertEquals('AUTH-1', $localAuth->getLocalId()); - $this->assertEquals('REFOUND-2', $localRefundAgain->getLocalId()); - }" -AmazonReferenceIdManagerTest,@var IAmazonReferenceId $item,"public function test_create_and_search_new_authorization_reference_id_with_capture_now_in_sync_and_asyn_mode() - { - $testRequestMode = array(IAmazonReferenceId::REQUEST_MODE_ASYNCHRONOUS, IAmazonReferenceId::REQUEST_MODE_SYNCHRONOUS); - foreach ($testRequestMode as $requestMode) { - $manager = new AmazonReferenceIdManager($this->amazonOrderReferenceId, $this->orderId); - $value = 10; - $transactionId = null; - /** @var IAmazonReferenceId $item */ - $item = $manager->createLocalAuthorizationReferenceIdWithCaptureNow($requestMode, $value, $transactionId); - - $this->assertEquals($value, $item->getValue()); - $this->assertEquals($transactionId, $item->getTransactionId()); - $this->assertEquals($requestMode, $item->getRequestMode()); - $this->assertEquals(IAmazonReferenceId::TYPE_AUTHORIZE, $item->getType()); - $this->assertTrue($item->getCaptureNow()); - $localId = $item->getLocalId(); - $this->assertFalse(empty($localId)); - - // make sure the item is really in the manager - - $itemInManager = $manager->findFromLocalReferenceId($localId, IAmazonReferenceId::TYPE_AUTHORIZE); - - $this->assertEquals($item, $itemInManager); - - // there should also be a matching capture entry - - $matchingCapture = $manager->findFromLocalReferenceId($localId, IAmazonReferenceId::TYPE_CAPTURE); - - $this->assertEquals($value, $matchingCapture->getValue()); - $this->assertEquals($transactionId, $matchingCapture->getTransactionId()); - $this->assertEquals($requestMode, $matchingCapture->getRequestMode()); - $this->assertEquals(IAmazonReferenceId::TYPE_CAPTURE, $matchingCapture->getType()); - $this->assertTrue($matchingCapture->getCaptureNow()); - $this->assertEquals($localId, $matchingCapture->getLocalId()); - }" -AmazonReferenceIdManagerTest,@var IAmazonReferenceId $item,"public function test_create_and_search_new_capture_reference_id() - { - $manager = new AmazonReferenceIdManager($this->amazonOrderReferenceId, $this->orderId); - $value = 10; - $transactionId = null; - /** @var IAmazonReferenceId $item */ - $item = $manager->createLocalCaptureReferenceId($value, $transactionId); - - $this->assertEquals($value, $item->getValue()); - $this->assertEquals($transactionId, $item->getTransactionId()); - $this->assertEquals(IAmazonReferenceId::TYPE_CAPTURE, $item->getType()); - $this->assertFalse($item->getCaptureNow()); - $localId = $item->getLocalId(); - $this->assertFalse(empty($localId)); - - // make sure the item is really in the manager - - $itemInManager = $manager->findFromLocalReferenceId($localId, IAmazonReferenceId::TYPE_CAPTURE); - - $this->assertEquals($item, $itemInManager); - }" -MTPkgCmsSubNavigation_PkgShop,"* sub navi using category tree if on an active category. -/*","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oActiveRootCategory = TdbShop::GetActiveRootCategory(); - if (null === $oActiveRootCategory) { - parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); - - return; - }" -MTPkgCmsSubNavigation_PkgShop,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return","public function _AllowCache() - { - return true; - }" -MTPkgCmsSubNavigation_PkgShop,* @return null|string,"public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - - $parameters['activeRootCategoryId'] = $this->getActiveRootCategoryId(); - $parameters['activeCategoryId'] = $this->getActiveCategoryId(); - - return $parameters; - }" -TPkgExtranetRegistrationGuestMapper_Form,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oActiveUser', 'TdbDataExtranetUser', TdbDataExtranetUser::GetInstance()); - $oRequirements->NeedsSourceObject('oExtranetConfiguration', 'TdbDataExtranet', TdbDataExtranet::GetInstance()); - $oRequirements->NeedsSourceObject('oThankYouOrderStep', 'TdbShopOrderStep'); - $oRequirements->NeedsSourceObject('oTextBlock'); - }" -TPkgExtranetRegistrationGuestMapper_Form,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oActiveUser TdbDataExtranetUser */ - $oActiveUser = $oVisitor->GetSourceObject('oActiveUser'); - /** @var $oActiveOrderStep TdbShopOrderStep */ - $oActiveOrderStep = $oVisitor->GetSourceObject('oThankYouOrderStep'); - $oLastBoughtUser = $oActiveOrderStep->GetLastUserBoughtFromSession(); - $bRegistrationGuestIsAllowed = false; - if ('thankyou' == $oActiveOrderStep->fieldSystemname && $oLastBoughtUser) { - if ($oActiveUser->RegistrationGuestIsAllowed($oLastBoughtUser)) { - /** @var $oTextBlock TdbPkgCmsTextBlock */ - $oTextBlock = $oVisitor->GetSourceObject('oTextBlock'); - if ($oTextBlock && $oTextBlock instanceof TdbPkgCmsTextBlock) { - $aTextBlock = array(); - $aTextBlock['sTitle'] = $oTextBlock->fieldName; - $aTextBlock['sText'] = $oTextBlock->GetTextField('content'); - $oVisitor->SetMappedValue('aTextData', $aTextBlock); - }" -TPkgExtranetRegistrationGuest_TDataExtranetUser,"* Checks if active user and given last bought user. - * - * @param TdbDataExtranetUser $oLastBoughtUser - * - * @return bool","public function RegistrationGuestIsAllowed($oLastBoughtUser) - { - $bRegistrationGuestIsAllowed = false; - if (!is_null($oLastBoughtUser) && !$this->IsLoggedIn() && !$oLastBoughtUser->LoginExists()) { - $bRegistrationGuestIsAllowed = true; - }" -TPkgExtranetRegistrationGuest_TDataExtranetUser,"* Returns the link to registration guest page. - * - * @return string","public function GetLinkForRegistrationGuest() - { - $oURLData = TCMSSmartURLData::GetActive(); - $oShop = TdbShop::GetInstance($oURLData->iPortalId); - $sRegisterPath = $oShop->GetLinkToSystemPage(self::NAME_SYSTEM_PAGE); - - return $sRegisterPath; - }" -MTExtranetRegistrationGuestCore,"* Use this package module to register user after creating order with guest account. - * - * @psalm-suppress UndefinedInterfaceMethod - * @FIXME `HeaderURLRedirect` only exist on one implementation of `ChameleonControllerInterface`","public function Init() - { - parent::Init(); - $this->HandleRegisterAfterShopping(); - }" -TPkgImageHotspotMapper,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oPkgImageHotspot', 'TdbPkgImageHotspot'); - $oRequirements->NeedsSourceObject('sActiveItemId', 'string'); - $oRequirements->NeedsSourceObject('sMapperConfig', 'string'); // the module view to use when rendering the content of the presenter - $oRequirements->NeedsSourceObject('aObjectRenderConfig', 'array'); // array of the form array('classname'=>array('mapper'=>('mapper1','mapper2'),'snippet'=>'view.html.twig'),...) - }" -TPkgImageHotspotMapper,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oPkgImageHotspot TdbPkgImageHotspot */ - $oPkgImageHotspot = $oVisitor->GetSourceObject('oPkgImageHotspot'); - if ($oPkgImageHotspot && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oPkgImageHotspot->table, $oPkgImageHotspot->id); - }" -TPkgImageHotspot,* @return TdbPkgImageHotspotItemList,"public function GetFieldPkgImageHotspotItemList() - { - $oList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->id, $this->iLanguageId); - $oList->ChangeOrderBy(array('position' => 'ASC')); - $oList->bAllowItemCache = true; - $i = 0; - $oList->GoToStart(); - while ($oItem = $oList->Next()) { - ++$i; - }" -TPkgImageHotspotItem,* the URL parameter to fetch an item.,"public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - - $oView->AddVar('oItem', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, TdbPkgImageHotspotItem::VIEW_PATH, $sViewType); - }" -TPkgImageHotspotItem,"* render the hotspot image. - * - * @param string $sViewName - name of the view - * @param string $sViewType - where to look for the view - * @param array $aCallTimeVars - optional parameters to pass to render method - * - * @return string","public function GetNextItem() - { - /** @var TdbPkgImageHotspotItem|null $oNextItem */ - $oNextItem = $this->GetFromInternalCache('oNextItem'); - if (is_null($oNextItem)) { - $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId); - $oItemList->bAllowItemCache = true; - if ($oItemList->Length() > 1) { - $oNextItem = null; - - /** @var TdbPkgImageHotspotItem $oFirst */ - $oFirst = $oItemList->Current(); - while (is_null($oNextItem) && ($oTmpItem = $oItemList->Next())) { - if ($oTmpItem->IsSameAs($this)) { - $oNextItem = $oItemList->Next(); - }" -TPkgImageHotspotItem,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function GetPreviousItem() - { - /** @var TdbPkgImageHotspotItem|null $oPreviousItem */ - $oPreviousItem = $this->GetFromInternalCache('oPreviousItem'); - if (is_null($oPreviousItem)) { - $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId); - $oItemList->bAllowItemCache = true; - if ($oItemList->Length() > 1) { - $oPreviousItem = null; - $oItemList->GoToEnd(); - while (is_null($oPreviousItem) && ($oTmpItem = $oItemList->Previous())) { - if ($oTmpItem->IsSameAs($this)) { - $oPreviousItem = $oItemList->Previous(); - }" -TPkgImageHotspotItem,"* returns the item next in line relative to this item - * if the current item is the last in line, the method will return the first item. returns false if - * no next item exists. - * - * @return TdbPkgImageHotspotItem|false|null","public function GetLink() - { - return $this->getActivePageService()->getLinkToActivePageRelative(array( - TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot() => array('id' => $this->id), - )); - }" -TPkgImageHotspotItem,@var TdbPkgImageHotspotItem|null $oNextItem,"public function GetAjaxLink($sViewName = 'standard', $sType = 'Core', $aParameter = array()) - { - $oGlobal = TGlobal::instance(); - $oRunningModule = $oGlobal->GetExecutingModulePointer(); - $aParameter['id'] = $this->id; - $aParameter['sViewName'] = $sViewName; - $aParameter['sType'] = $sType; - $aData = array( - TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot() => $aParameter, - 'module_fnc' => array($oRunningModule->sModuleSpotName => 'ExecuteAjaxCall'), - '_fnc' => 'AjaxRenderHotspotImage', - ); - - return $this->getActivePageService()->getLinkToActivePageRelative($aData); - }" -TPkgImageHotspotItemMarker,"* render the hotspot image. - * - * @param string $sViewName - name of the view - * @param string $sViewType - where to look for the view - * @param array $aCallTimeVars - optional parameters to pass to render method - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oMarker', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, TdbPkgImageHotspotItemMarker::VIEW_PATH, $sViewType); - }" -TPkgImageHotspotItemMarker,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function GetURLForConnectedRecord() - { - $oSpotObject = $this->GetFieldLinkedRecord(); - $oCmsConfig = TdbCmsConfig::GetInstance(); - $sLink = $this->fieldUrl; - if (is_object($oSpotObject)) { - if ($oSpotObject instanceof TdbCmsTplPage) { - $sLink = $this->getPageService()->getLinkToPageObjectRelative($oSpotObject); - }" -TPkgImageHotspotItemSpot,"* return a pointer to the object assigned to the spot. - * - * @return TCMSRecord|null","public function GetSpotObject() - { - $oObject = $this->GetFromInternalCache('oObjectAssignedToSpot'); - if (is_null($oObject)) { - $oObject = $this->GetFieldLinkedRecord(); - $this->SetInternalCache('oObjectAssignedToSpot', $oObject); - }" -TPkgImageHotspotItemSpot,"* fetches the connected record and tries to get a url from that. - * - * @return string","public function GetURLForConnectedRecord() - { - $oSpotObject = $this->GetSpotObject(); - if (null === $oSpotObject) { - return ''; - }" -TPkgImageHotspotItemSpot,@psalm-suppress UndefinedMethod,"public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oSpot', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, TdbPkgImageHotspotItemSpot::VIEW_PATH, $sViewType); - }" -MTPkgImageHotspotCore,"* Es wird ein Modul geschaffen, bei dem eine beliebige Anzahl Bilder definiert werden kann. - * Bei jedem Bild können Hotspots im Bild positioniert und mit einem Artikel verknüpft werden. - * Auf der Webseite wird das erste Bild angezeigt, jeweils mit einem Link zu den anderen Bildern - * (eine Art Blätterfunktion). Die Hotspots sind mit kleinen Kreuzen auf dem Bild markiert. Fährt - * ein Kunde mit der Maus über einen Hotspot, erscheinen der Artikelname und der Preis. Klickt der - * Kunde auf den Hotspot, dann gelangt er zur Detailseite des Artikels. -/*","public function Init() - { - parent::Init(); - if ($this->global->UserDataExists(TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot())) { - $this->aUserRequestData = $this->global->GetUserData(TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot()); - if (!is_array($this->aUserRequestData)) { - $this->aUserRequestData = array(); - }" -MTPkgImageHotspotCore,* @var string|null,"public function Execute() - { - parent::Execute(); - $this->data['oHotspotConfig'] = $this->GetHotspotConfig(); - $this->data['oActiveItem'] = $this->GetActiveItem(); - $this->data['oNextItem'] = $this->GetNextItem(); - $this->data['sLinkNextItem'] = ''; - $this->data['oAllItems'] = $this->GetHotspotConfig()->GetFieldPkgImageHotspotItemList(); - - return $this->data; - }" -MTPkgImageHotspotCore,* @var TdbPkgImageHotspotItem|null,"public function _AllowCache() - { - return true; - }" -MTPkgImageHotspotCore,* @var TdbPkgImageHotspotItem|null,"public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - $parameters['sActiveItemId'] = $this->sActiveItemId; - - return $parameters; - }" -MTPkgImageHotspotCore,* @var TdbPkgImageHotspot|null,"public function _GetCacheTableInfos() - { - $aTriggers = parent::_GetCacheTableInfos(); - if (!is_array($aTriggers)) { - $aTriggers = array(); - }" -MTPkgImageHotspotCore,"* any request data send to the module. - * - * @var array","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - if (!is_array($aIncludes)) { - $aIncludes = array(); - }" -SearchRequestMapper,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('shop', 'TdbShop'); - $oRequirements->NeedsSourceObject('stateObject', '\ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\StateInterface'); - }" -SearchRequestMapper,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - /** @var $shop \TdbShop */ - $shop = $oVisitor->GetSourceObject('shop'); - /** @var $state StateInterface */ - $state = $oVisitor->GetSourceObject('stateObject'); - - $queryParam = $state->getQueryParameter(); - $query = (isset($queryParam['q'])) ? $queryParam['q'] : ''; - $oSearchCache = $shop->GetActiveSearchObject(); - - $searchWasAltered = ($query !== $oSearchCache->sSearchTerm); - - $aData = array( - 'searchWasAltered' => $searchWasAltered, - 'searchQueryOriginal' => $query, - 'searchQuery' => $oSearchCache->sSearchTerm, - 'spellCheckLink' => false, - 'spellCheckSuggestion' => false, - ); - if (null !== $oSearchCache->sSearchTermSpellChecked) { - $aData['spellCheckLink'] = $oSearchCache->GetSearchLinkForTerm($oSearchCache->sSearchTermSpellChecked); - $aData['spellCheckSuggestion'] = $oSearchCache->sSearchTermSpellCheckedFormated; - }" -StateRequestExtractor,"* @param array $configuration - * @param array $requestData - * @param string $listSpotName - * - * @return array","public function extract(array $configuration, array $requestData, $listSpotName) - { - $searchQuery = $this->getSearchQuery($requestData); - $searchFilter = $this->getSearchFilter($requestData); - if (null === $searchQuery && null === $searchFilter) { - return array(); - }" -ShopSearchLoggerBridge,* @var \ChameleonSystem\ShopBundle\Interfaces\ShopServiceInterface,"public function __construct( - ShopServiceInterface $shop, - LanguageServiceInterface $languageService - ) { - $this->shop = $shop; - $this->languageService = $languageService; - }" -ShopSearchLoggerBridge,* @var \ChameleonSystem\CoreBundle\Service\LanguageServiceInterface,"public function logSearch($searchString, array $searchFilter, $numberOfMatches) - { - $searchString = $this->convertSearchToString($searchString, $searchFilter); - $oLog = \TdbShopSearchLog::GetNewInstance(); - /** @var $oLog \TdbShopSearchLog */ - $aData = array( - 'name' => $searchString, - 'shop_id' => $this->shop->getId(), - 'number_of_results' => $numberOfMatches, - 'search_date' => date('Y-m-d H:i:s'), - 'cms_language_id' => $this->languageService->getActiveLanguageId(), - ); - $oUser = $this->getExtranetUserProvider()->getActiveUser(); - if (null !== $oUser && null !== $oUser->id) { - $aData['data_extranet_user_id'] = $oUser->id; - }" -ShopSearchSessionChameleonBridge,* @var \Symfony\Component\HttpFoundation\Session\SessionInterface,"public function __construct(SessionInterface $session) - { - $this->session = $session; - }" -ShopSearchSessionChameleonBridge,"* @param array $searchRequest - * @return void","public function addSearch(array $searchRequest) - { - $searchKey = md5($this->getArrayAsString($searchRequest)); - $searches = $this->session->get(ShopSearchSessionInterface::SESSION_KEY, array()); - $searches[] = $searchKey; - $this->session->set(ShopSearchSessionInterface::SESSION_KEY, $searches); - }" -ShopSearchSessionChameleonBridge,"* @param array $searchRequest - * @return bool","public function hasSearchedFor(array $searchRequest) - { - $searchKey = md5($this->getArrayAsString($searchRequest)); - - $searches = $this->session->get(ShopSearchSessionInterface::SESSION_KEY, array()); - - return in_array($searchKey, $searches); - }" -ChameleonSystemSearchExtension,* @return void,"public function load(array $config, ContainerBuilder $container) - { - $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - }" -ChameleonSystemSearchExtension,"* {@inheritdoc} - * - * @return void","public function prepend(ContainerBuilder $container) - { - $container->prependExtensionConfig('monolog', ['channels' => ['search_indexer']]); - }" -SearchResultLoggerListener,* @var ShopSearchSessionInterface,"public function __construct(ShopSearchSessionInterface $session, ShopSearchLoggerInterface $searchLogger, ShopServiceInterface $shopService) - { - $this->session = $session; - $this->searchLogger = $searchLogger; - $this->shopService = $shopService; - }" -SearchResultLoggerListener,* @var ShopSearchLoggerInterface,"public function onArticleListResultGenerated(ArticleListFilterExecutedEvent $event) - { - if (false === $this->isSearchEvent($event)) { - return; - }" -SearchResultTriggerCmsObserverListener,* @return void,"public function onArticleListResultGenerated(ArticleListFilterExecutedEvent $event) - { - if (false === $this->isSearchEvent($event)) { - return; - }" -,"* @param string $searchString - * @param array $searchFilter - * @param int $numberOfMatches - * @return void","public function logSearch($searchString, array $searchFilter, $numberOfMatches); -}" -,"* @param array $searchRequest - * @return void","public function addSearch(array $searchRequest); - - /** - * @param array $searchRequest - * @return bool - */ - public function hasSearchedFor(array $searchRequest); -}" -TPkgSearchObserver,"* search stats. - * - * @var array","public function GetSearch($sSearchTypeIdentifier) - { - if (isset($this->aSearches[$sSearchTypeIdentifier])) { - return $this->aSearches[$sSearchTypeIdentifier]; - }" -TPkgSearchObserver,"* @static - * - * @return TPkgSearchObserver","public function AddSearch($sSearchTypeIdentifier, $iNumberOfResults) - { - $this->aSearches[$sSearchTypeIdentifier] = new stdClass(); - $this->aSearches[$sSearchTypeIdentifier]->iNumberOfResults = $iNumberOfResults; - }" -TPkgSearchObserver,"* @param string $sSearchTypeIdentifier - * @return mixed|null","public function PkgCmsEventNotify(IPkgCmsEvent $oEvent) - { - if (TPkgCmsEvent::CONTEXT_CORE === $oEvent->GetContext() && TPkgCmsEvent::NAME_PRE_OUTPUT_CALLBACK_FUNCTION === $oEvent->GetName()) { - $oShop = $this->getShopService()->getActiveShop(); - if ($oShop->fieldRedirectToNotFoundPageProductSearchOnNoResults) { - $iTotalResults = 0; - foreach ($this->aSearches as $sSearchIdentifier => $oSearchData) { - $iTotalResults = $iTotalResults + $oSearchData->iNumberOfResults; - }" -TShopSearchCache,"* the search term. - * - * @var string","public function __construct($id = null, $sLanguageId = null) - { - $this->SetChangeTriggerCacheChange(false); - parent::__construct($id, $sLanguageId); - }" -TShopSearchCache,"* the search term spellchecked. - * - * @var string","public function GetSearchLink($aFilterAddition = array(), $aExcludeFilterKeys = array()) - { - $sLink = ''; - - $aParams = array(); - - if (is_array($this->aSearchTerms) && count($this->aSearchTerms) > 0) { - $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY.'[0]'] = $this->sSearchTerm; - reset($this->aSearchTerms); - foreach ($this->aSearchTerms as $fieldId => $sVal) { - $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY.""[{$fieldId}" -TShopSearchCache,"* the search term spellchecked. - * - * @var string","public function GetSearchLinkForTerm($sTerm) - { - $aParams = array(TShopModuleArticlelistFilterSearch::PARAM_QUERY => $sTerm); - $oShop = TdbShop::GetInstance(); - $sLink = $oShop->GetLinkToSystemPage('search', $aParams); - - return $sLink; - }" -TShopSearchCache,"* a list of field specific search terms. - * - * @var array","public function ProcessSearchQueryBeforeInsert($sQuery) - { - return $sQuery; - }" -TShopSearchCache,"* any filter applied to the search. - * - * @var array","public function GetBestSuggestion($aWords) - { - $sBestWord = ''; - reset($aWords); - - while (empty($sBestWord) && ($sWord = current($aWords))) { - $sEscapedWord = TShopSearchIndexer::PrepareSearchWord($sWord); - if (!empty($sEscapedWord)) { - $sIndexTable = TShopSearchIndexer::GetIndexTableNameForIndexLength(mb_strlen($sEscapedWord)); - $query = 'SELECT * FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTable).""` WHERE `substring` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sEscapedWord).""'""; - $tRes = MySqlLegacySupport::getInstance()->query($query); - if (MySqlLegacySupport::getInstance()->num_rows($tRes) > 0) { - $sBestWord = $sWord; - }" -TShopSearchCache,"* @param string|null $id - * @param string|null $sLanguageId","public function GetSearchResultCategoryHits($sFilters = '') - { - $aHits = array(); - if (!empty($this->fieldCategoryHits) && empty($sFilters)) { - $aHits = unserialize($this->fieldCategoryHits); - }" -TShopSearchCache,"* return current filter. - * - * @return array","public function GetNumberOfHits() - { - if ($this->fieldNumberOfRecordsFound < 0) { - $query = ""SELECT COUNT(*) AS recs FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""'""; - if ($row = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { - $this->fieldNumberOfRecordsFound = $row['recs']; - $this->sqlData['number_of_records_found'] = $this->fieldNumberOfRecordsFound; - $this->AllowEditByAll(true); - $this->Save(); - }" -TShopSearchCache,"* return a search query based on the current filter. - * - * @param array $aExcludeFilterKeys - any filter keys (same as in $this->aFilter) you place in here - * will be excluded from the link - * @param array $aFilterAddition - * - * @return string","public function CacheIsStale() - { - $cachAge = strtotime($this->fieldLastUsedDate); - $bIsStale = ((time() - $cachAge) > TdbShopSearchCache::MAX_CACHE_AGE_IN_SECONDS); - - return $bIsStale; - }" -TShopSearchCache,"* @param string $sTerm - * @return string","public function ClearCache() - { - $query = ""DELETE FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' ""; - MySqlLegacySupport::getInstance()->query($query); - $query = ""DELETE FROM `shop_search_cache` WHERE `id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""'""; - MySqlLegacySupport::getInstance()->query($query); - $this->id = null; - $this->sqlData['id'] = null; - }" -TShopSearchFieldWeight,"* create field index for the row. Note: we assume the index tables exists. - * - * @param array $aRowData - * - * @return void","public function CreateIndexTick($aRowData) - { - // make sure the index table exists... if it does not, create it - if (array_key_exists($this->fieldFieldNameInQuery, $aRowData) && array_key_exists('xxx_shop_article_id', $aRowData)) { - $sFieldValue = $aRowData[$this->fieldFieldNameInQuery]; - $iArticleId = $aRowData['xxx_shop_article_id']; - - $aIndexTableNames = TdbShopSearchIndexer::GetAllIndexTableNames(); - foreach ($aIndexTableNames as $sTableName => $iSubstringLength) { - $this->ProcessIndex($sFieldValue, $iArticleId, $sTableName, $iSubstringLength); - }" -TShopSearchIndexer,@var string[],"public function SetRegenerateCompleteIndex($bRegenerateCompleteIndex) - { - $this->bRegenerateCompleteIndex = $bRegenerateCompleteIndex; - if (!$this->bRegenerateCompleteIndex) { - if (false == TGlobal::TableExists('shop_search_reindex_queue') || PKG_SEARCH_USE_SEARCH_QUEUE == false) { - $this->bRegenerateCompleteIndex = true; - }" -TShopSearchIndexer,"* set to false, if you want to update the index only for those objects that changed. - * - * @var bool","public function GetIndexStatus() - { - $dStatus = false; - - if ($this->IsRunning()) { - $iRemainingRows = $this->GetRemainingRowCount(); - if (0 == $iRemainingRows) { - $dStatus = false; - $this->IndexCompletedHook(); - }" -TShopSearchIndexer,"* set index mode (full or partial). - * - * @param bool $bRegenerateCompleteIndex - set to true if you want a full reindexing or false if you do not - * - * @return void","public function IsRunning() - { - return '0000-00-00 00:00:00' == $this->fieldCompleted; - }" -TShopSearchIndexer,* @return void,"public function IndexerHasFinished() - { - $bIsDone = (!is_array($this->aTablesToProcess) || count($this->aTablesToProcess) < 1); - if ($bIsDone) { - $this->IndexCompletedHook(); - }" -TShopSearchIndexer,"* commit processing data to database. - * - * @return void","public function ProcessNextIndexStep($bIndexUsingTicker = true) - { - $this->getCache()->disable(); - // if no index is running, prepare the indexer - $iTickerSize = self::INDEX_SET_SIZE; - if (!$bIndexUsingTicker) { - $iTickerSize = -1; - }" -TShopSearchIndexer,"* returns the index status (false=not running, number = percent done). - * - * @return float|false","public function InitializeIndexer() - { - $bWorkToDo = true; - if (!$this->bRegenerateCompleteIndex) { - // drop index - $query = ""UPDATE shop_search_reindex_queue SET `processing` = '1'""; - MySqlLegacySupport::getInstance()->query($query); - $query = ""SELECT COUNT(*) AS reccount FROM shop_search_reindex_queue WHERE `processing` = '1'""; - $aCount = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query)); - if ($aCount['reccount'] > 0) { - $query = ""SHOW TABLES LIKE '_index_%'""; - $tRes = MySqlLegacySupport::getInstance()->query($query); - while ($aIndexTable = MySqlLegacySupport::getInstance()->fetch_row($tRes)) { - $query = ""DELETE FROM {$aIndexTable[0]}" -TShopSearchIndexer,@var float $dStatus,"public function IndexHasContent() - { - $bHasContent = true; - $aTables = static::GetAllIndexTableNames(); - foreach ($aTables as $sTableName => $iLength) { - $bHasContent = ($bHasContent && TGlobal::TableExists($sTableName)); - }" -TShopSearchIndexer,"* return the number of rows still to process. - * - * @return int","public function CreateIndexTables() - { - $aIndexTableNames = TdbShopSearchIndexer::GetAllIndexTableNames(); - $aTmpIndex = array(); - foreach ($aIndexTableNames as $sTableName => $length) { - $aTmpIndex['_tmp'.$sTableName] = $length; - }" -TShopSearchLog,"* @param string|null $id - * @param string|null $sLanguageId","public function __construct($id = null, $sLanguageId = null) - { - $this->SetChangeTriggerCacheChangeOnParentTable(false); - parent::__construct($id, $sLanguageId); - }" -TShopSearchQuery,"* returns true if the index is still running. - * will stop the index if no entries are left to index. - * - * @return bool","public function IndexIsRunning() - { - $bIsRunning = false; - if ($this->fieldIndexRunning) { - $bIsRunning = ($this->NumberOfRecordsLeftToIndex() > 0); - }" -TShopSearchQuery,"* prepare the index table. - * - * @param bool $bRegenerateCompleteIndex - * - * @return void","public function StartIndex($bRegenerateCompleteIndex = true) - { - if (!$this->IndexIsRunning()) { - $res = MySqlLegacySupport::getInstance()->query($this->fieldQuery.' LIMIT 0,1'); - // we do not care about the type contents of the fields... just how many there are - if ($tmp = MySqlLegacySupport::getInstance()->fetch_assoc($res)) { - // got something.... so start indexeer - $aData = $this->sqlData; - $aData['index_running'] = '1'; - $aData['index_started'] = date('Y-m-d H:i:s'); - $this->LoadFromRow($aData); - $this->AllowEditByAll(true); - $this->Save(); - - $sFields = ''; - $aFields = array_keys($tmp); - // the last entry in the list will be renamed to shop_article_id - $aFields[count($aFields) - 1] = 'xxx_shop_article_id'; - foreach ($aFields as $iFieldIndex => $sFieldName) { - $aFields[$iFieldIndex] = '`'.MySqlLegacySupport::getInstance()->real_escape_string($sFieldName).'`'; - if ('id' == $sFieldName || '_id' == substr($sFieldName, -3)) { - $sFields .= ""{$aFields[$iFieldIndex]}" -TShopSearchQuery,"* creates index for the number of rows requested. returns the real number of rows processed. - * - * @param int $iNumberOfRowsToProcess - if set to -1 we will process all rows - * - * @return int","public function CreateIndexTick($iNumberOfRowsToProcess) - { - $iRealNumberProcessed = 0; - $oFields = TdbShopSearchFieldWeightList::GetListForShopSearchQueryId($this->id); - if (CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS > 0) { - usleep(CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS * 1000); - }" -TShopSearchQuery,"* returns the number of records that still need to be indext for the query - * will stop the index if no entries are left to index. - * - * @return int","public function NumberOfRecordsLeftToIndex() - { - $iCount = 0; - if ($this->fieldIndexRunning) { - $sIndexTableName = $this->GetIndexRawTableName(); - $query = ""SHOW TABLES LIKE '"".MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).""'""; - $tRes = MySqlLegacySupport::getInstance()->query($query); - $bTableExists = (MySqlLegacySupport::getInstance()->num_rows($tRes) >= 1); - if ($bTableExists) { - $query = 'SELECT COUNT(sysid) AS reccount FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`'; - if ($trow = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { - $iCount = $trow['reccount']; - }" -TShopSearchQuery,"* stop the current index operation. - * - * @return void","public function StopIndex() - { - $sIndexTableName = $this->GetIndexRawTableName(); - if (TCMSRecord::TableExists($sIndexTableName)) { - $query = 'DROP TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`'; - MySqlLegacySupport::getInstance()->query($query); - }" -StateRequestExtractorTest,* @var StateRequestExtractor,"public function it_should_extract_the_active_search_query($requestData, $expectedReturnData) - { - $this->given_a_state_request_extractor(); - $this->given_request_data($requestData); - $this->when_we_call_extract(); - $this->then_we_expect_return_data_matching($expectedReturnData); - }" -StateRequestExtractorTest,"* @test - * @dataProvider dataProviderRequestData - * - * @param $requestData - * @param $expectedReturnData","public function dataProviderRequestData() - { - return array( - array( - array('foo' => 'bar'), - array(), - ), - array( - array(\TShopModuleArticlelistFilterSearch::PARAM_QUERY => 'somequery'), - array(StateInterface::QUERY => array(\TShopModuleArticlelistFilterSearch::PARAM_QUERY => 'somequery')), - ), - array( - array(\TShopModuleArticlelistFilterSearch::URL_FILTER => array('some' => 'filter')), - array(StateInterface::QUERY => array(\TShopModuleArticlelistFilterSearch::URL_FILTER => array('some' => 'filter'))), - ), - array( - array(\TShopModuleArticlelistFilterSearch::PARAM_QUERY => 'somequery', \TShopModuleArticlelistFilterSearch::URL_FILTER => array('some' => 'filter')), - array(StateInterface::QUERY => array(\TShopModuleArticlelistFilterSearch::PARAM_QUERY => 'somequery', \TShopModuleArticlelistFilterSearch::URL_FILTER => array('some' => 'filter'))), - ), - ); - }" -SearchResultLoggerListenerTest,* @var SearchResultLoggerListener,"public function it_should_log_a_search($filterType, $searchParameter, $numberOfResults, $userHasSearchedBefore) - { - $this->given_a_filter_type($filterType); - $this->given_a_search_for($searchParameter); - $this->given_search_found($numberOfResults); - $this->given_the_user_ran_search_before($userHasSearchedBefore); - $this->given_an_instance_of_the_listener(); - $this->when_we_call_onArticleListResultGenerated(); - }" -SearchResultLoggerListenerTest,"* @test - * @dataProvider dataProviderLogSearch - * - * @param $searchParameter - * @param $numberOfResults - * @param $userHasSearchedBefore","public function dataProviderLogSearch() - { - return array( - array( - '\TShopModuleArticlelistFilterSearch', // is search filter - array('q' => 'something', 'lf' => array()), // $searchParameter - 10, // $numberOfResults - false, // $userHasSearchedBefore - ), - array( - '\TShopModuleArticlelistFilterSearch', // is search filter - array('q' => 'something', 'lf' => array()), // $searchParameter - 10, // $numberOfResults - true, // $userHasSearchedBefore - ), - array( - '\TShopModuleArticleListFilter', // is search filter - array('q' => 'something', 'lf' => array()), // $searchParameter - 10, // $numberOfResults - false, // $userHasSearchedBefore - ), - ); - }" -TPkgShopAffiliate,@var string|null,"public function FoundCodeHook($sCode, $bRestoredFromCookie = false) - { - }" -TPkgShopAffiliate,"* return instance of class (casted as correct type. - * - * @param string $sId - * - * @return TdbPkgShopAffiliate","public function RenderHTMLCode($oOrder) - { - $aParameter = $oOrder->GetSQLWithTablePrefix($oOrder->table); - - $aParameter['dNetProductValue'] = $oOrder->GetNetProductValue(); - $aParameter['dNetProductAfterDiscountsAndVouchersValue'] = $aParameter['dNetProductValue']; - - $aParameter['sAffiliateCode'] = $this->sCode; - $oParamList = $this->GetFieldPkgShopAffiliateParameterList(); - while ($oParam = $oParamList->Next()) { - $aParameter[$oParam->fieldName] = $oParam->fieldValue; - }" -TPkgShopAffiliateList,"* factory returning an element for the list. - * - * @param array $aData - * - * @return TdbPkgShopAffiliate","public function __construct($sQuery = null, $sLanguageId = null) - { - parent::__construct($sQuery, $sLanguageId); - $this->bAllowItemCache = true; - }" -ChameleonSystemShopArticleDetailPagingBundle,* @return void,"public function build(ContainerBuilder $container) - { - $container->addCompilerPass(new ArticleListPass()); - }" -AddSpotToItemLinkMapper,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('sLink', 'string'); - $oRequirements->NeedsSourceObject('pagerLinkDetails', 'string'); - }" -AddSpotToItemLinkMapper,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapperVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - $link = $oVisitor->GetSourceObject('sLink'); - $pagerLinkDetails = $oVisitor->GetSourceObject('pagerLinkDetails'); - - $sep = '?'; - if (stripos($link, '?')) { - $sep = '&'; - }" -ArticleListApi,* @var \ChameleonSystem\ShopArticleDetailPagingBundle\Service\AddParametersToUrlService,"public function __construct(ContentFromUrlLoaderServiceInterface $contentLoader, AddParametersToUrlService $addParametersToUrlService) - { - $this->contentLoader = $contentLoader; - $this->addParametersToUrlService = $addParametersToUrlService; - }" -ArticleListApi,* @var \ChameleonSystem\ShopArticleDetailPagingBundle\Interfaces\ContentFromUrlLoaderServiceInterface,"public function get($listUrl, $spot) - { - $listRequestURL = $this->getFullURL($listUrl, $spot); - - return $this->getListResponse($listRequestURL); - }" -ListItem,@var string|null,"public function setId($id) - { - $this->id = $id; - }" -ListItem,@var string|null,"public function getId() - { - return $this->id; - }" -ListItem,@var string|null,"public function setName($name) - { - $this->name = $name; - }" -ListItem,"* @param string $id - * - * @return void","public function getName() - { - return $this->name; - }" -ListItem,* @return string|null,"public function setUrl($url) - { - $this->url = $url; - }" -ListItem,"* @param null $name - * - * @return void","public function getUrl() - { - return $this->url; - }" -ListResult,* @var string,"public function setItemList(array $itemList) - { - $this->itemList = $itemList; - }" -ListResult,* @var string,"public function getItemList() - { - return $this->itemList; - }" -ListResult,"* @var array (key = id)","public function setNextPageUrl($nextPageUrl) - { - $this->nextPageUrl = $nextPageUrl; - }" -ListResult,"* @param array $itemList - * - * @return void","public function getNextPageUrl() - { - return $this->nextPageUrl; - }" -ListResult,"* @return array","public function setPreviousPageUrl($previousPageUrl) - { - $this->previousPageUrl = $previousPageUrl; - }" -ListResult,"* @param string $nextPageUrl - * - * @return void","public function getPreviousPageUrl() - { - return $this->previousPageUrl; - }" -DetailPagingModule,* @var \ChameleonSystem\ShopArticleDetailPagingBundle\Interfaces\DetailPagingServiceInterface,"public function __construct(ShopServiceInterface $shop, DetailPagingServiceInterface $detailPagingService) - { - $this->detailPagingService = $detailPagingService; - $activeProduct = $shop->getActiveProduct(); - if ($activeProduct) { - $this->activeProductId = $activeProduct->id; - }" -DetailPagingModule,@var string|null,"public function Init() - { - parent::Init(); - }" -DetailPagingModule,* {@inheritdoc},"public function _AllowCache() - { - return false; - }" -ShopArticleListDetailPagePagerExtensionModule,* @var RequestToListUrlConverterInterface,"public function AllowAccessWithoutAuthenticityToken($sMethodName) - { - $allowAccess = parent::AllowAccessWithoutAuthenticityToken($sMethodName); - - return $allowAccess || 'getAsJson' === $sMethodName; - }" -ShopArticleListDetailPagePagerExtensionModule,* {@inheritdoc},"public function setRequestToListUrlConverter(RequestToListUrlConverterInterface $requestToListUrlConverter) - { - $this->requestToListUrlConverter = $requestToListUrlConverter; - }" -ContentFromUrlLoaderService,* @var \Symfony\Component\HttpKernel\HttpKernelInterface,"public function __construct(HttpKernelInterface $kernel, RequestStack $requestStack) - { - $this->kernel = $kernel; - $this->requestStack = $requestStack; - }" -ContentFromUrlLoaderService,* @var \Symfony\Component\HttpFoundation\RequestStack,"public function load($url) - { - $masterRequest = $this->requestStack->getMainRequest(); - $request = Request::create($url, 'GET', array(), $masterRequest->cookies->all(), array(), $masterRequest->server->all()); - if (true === $masterRequest->hasSession()) { - $request->setSession($masterRequest->getSession()); - }" -ContentFromUrlLoaderStandardService,* @var RequestStack,"public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - }" -ContentFromUrlLoaderStandardService,"* @param string $url - * - * @return string - * - * @throws ContentLoadingException","public function load($url) - { - $request = $this->requestStack->getCurrentRequest(); - - if (null === $request) { - throw new ContentLoadingException('Content loader needs current request; none found.'); - }" -RequestToListUrlConverter,* @var InputFilterUtilInterface,"public function __construct(InputFilterUtilInterface $inputFilterUtil) - { - $this->inputFilterUtil = $inputFilterUtil; - }" -RequestToListUrlConverter,* @return null|string,"public function getListUrl() - { - return $this->getListUrlFromParameters(); - }" -RequestToListUrlConverter,* @return null|string,"public function getListSpotName() - { - return $this->inputFilterUtil->getFilteredInput(self::URL_PARAMETER_SPOT_NAME, null); - }" -RequestToListUrlConverter,* @return null|string,"public function getPagerParameter($listSpotName, $listPageUrl) - { - return array( - RequestToListUrlConverterInterface::URL_PARAMETER_SPOT_NAME => $listSpotName, - RequestToListUrlConverterInterface::URL_PARAMETER_LIST_URL => $listPageUrl, - ); - }" -ChameleonSystemShopArticleDetailPagingExtension,* @return void,"public function load(array $config, ContainerBuilder $container) - { - $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - }" -ArticleListPass,"* You can modify the container here before it is dumped to PHP code. - * - * @param ContainerBuilder $container - * - * @api - * - * @return void","public function process(ContainerBuilder $container) - { - $listModuleService = $container->getDefinition('chameleon_system_shop.module.article_list'); - $requestToListConverter = $container->getDefinition('chameleon_system_shop_article_detail_paging.request_to_list_url_converter'); - $listModuleService->addMethodCall('setRequestToListUrlConverter', array($requestToListConverter)); - }" -,"* @param string $listUrl - * @param string $spot - * - * @return ListResultInterface - * - * @throws ArticleListException","public function get($listUrl, $spot); -}" -,"* @param string $url - * - * @return string - * - * @throws ContentLoadingException","public function load($url); -}" -,"* @param string $currentArticleId - * @param string $pagerSpotName - * - * @return ListItemInterface - * - * @throws ArticleListException","public function getNextItem($currentArticleId, $pagerSpotName); - - /** - * @param string $currentArticleId - * @param string $pagerSpotName - * - * @return ListItemInterface - * - * @throws ArticleListException - */ - public function getPreviousItem($currentArticleId, $pagerSpotName); - - /** - * @param string $pagerSpotName - * @return string|null - */ - public function getBackToListUrl($pagerSpotName); -}" -,* @return string|null,"public function getUrl(); - - /** - * @return string|null - */ - public function getName(); - - /** - * @return string|null - */ - public function getId(); - - /** - * @param string $url - * - * @return void - */ - public function setUrl($url); - - /** - * @param null $name - * - * @return void - */ - public function setName($name); - - /** - * @param string $id - * - * @return void - */ - public function setId($id); -}" -,* @return string,"public function getNextPageUrl(); - - /** - * @return string - */ - public function getPreviousPageUrl(); - - /** - * @return array - */ - public function getItemList(); - - /** - * @param string $url - * @return void - */ - public function setNextPageUrl($url); - - /** - * @param string $url - * @return void - */ - public function setPreviousPageUrl($url); - - /** - * @param array $items (key = id) - * @return void - */ - public function setItemList(array $items); -}" -,* @return null|string,"public function getListUrl(); - - /** - * @return null|string - */ - public function getListSpotName(); - - /** - * @param string $listSpotName - * @param string $listPageUrl - * - * @return array - */ - public function getPagerParameter($listSpotName, $listPageUrl); -}" -AddParametersToUrlService,* @var \ChameleonSystem\CmsStringUtilitiesBundle\Interfaces\UrlUtilityServiceInterface,"public function __construct(UrlUtilityServiceInterface $urlUtility) - { - $this->urlUtility = $urlUtility; - }" -AddParametersToUrlService,"* @param string|null $url - * - * @return string","public function addParameterToUrl($url, array $parameter) - { - return $this->urlUtility->addParameterToUrl($url, $parameter); - }" -DetailPagingService,* @var RequestToListUrlConverterInterface,"public function __construct( - ArticleListApiInterface $listApi, - RequestToListUrlConverterInterface $requestToListUrlConverter, - AddParametersToUrlService $addParametersToUrlService - ) { - $this->requestToListUrlConverter = $requestToListUrlConverter; - $this->listApi = $listApi; - $this->addParametersToUrlService = $addParametersToUrlService; - }" -DetailPagingService,* @var ArticleListApiInterface,"public function getNextItem($currentArticleId, $pagerSpotName) - { - $result = $this->searchNext($currentArticleId, $this->requestToListUrlConverter->getListUrl()); - - if (null === $result) { - return null; - }" -DetailPagingService,* @var AddParametersToUrlService,"public function getPreviousItem($currentArticleId, $pagerSpotName) - { - $result = $this->searchPrevious($currentArticleId, $this->requestToListUrlConverter->getListUrl()); - if (null === $result) { - return null; - }" -DetailPagingService,"* @param string $currentArticleId - * @param string $pagerSpotName - * - * @return ListItemInterface|null - * - * @throws ArticleListException","public function getBackToListUrl($pagerSpotName) - { - return $this->requestToListUrlConverter->getListUrl(); - }" -ArticleListApiTest,* @var ArticleListApi,"public function it_fetches_a_response($responsePayload, $expectedPreviousPageUrl, $expectedNextPageUrl, $expectedItems) - { - $listSpotName = 'listSpotName'; - $listUrl = 'listUrl'; - - $this->given_that_the_list_is_in_spot($listSpotName); - $this->given_the_list_url_is($listUrl); - $this->given_that_the_list_response_payload_is($responsePayload); - $this->given_an_instance_of_the_api(); - $this->when_we_call_get(); - $this->we_expect_a_result_with($expectedNextPageUrl, $expectedPreviousPageUrl, $expectedItems); - }" -ArticleListApiTest,* @var ListResultInterface,"public function dataProviderListResponse() - { - return array( - array( - json_encode( - array( - 'previousPage' => 'previousPageUrl', - 'nextPage' => 'nextPageUrl', - 'items' => array( - 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), - 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), - 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), - ), - ) - ), //$responsePayload - 'previousPageUrl', //$expectedPreviousPageUrl - 'nextPageUrl', //$expectedNextPageUrl - array( - 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), - 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), - 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), - ), //$expectedItems - ), - - array( - json_encode( - array( - 'previousPage' => null, - 'nextPage' => 'nextPageUrl', - 'items' => array( - 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), - 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), - 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), - ), - ) - ), //$responsePayload - null, //$expectedPreviousPageUrl - 'nextPageUrl', //$expectedNextPageUrl - array( - 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), - 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), - 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), - ), //$expectedItems - ), - - array( - json_encode( - array( - 'previousPage' => 'previousPageUrl', - 'nextPage' => null, - 'items' => array( - 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), - 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), - 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), - ), - ) - ), //$responsePayload - 'previousPageUrl', //$expectedPreviousPageUrl - null, //$expectedNextPageUrl - array( - 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), - 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), - 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), - ), //$expectedItems - ), - - array( - json_encode( - array( - 'previousPage' => null, - 'nextPage' => null, - 'items' => array( - 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), - 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), - 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), - ), - ) - ), //$responsePayload - null, //$expectedPreviousPageUrl - null, //$expectedNextPageUrl - array( - 'FIRST-ITEM' => array('id' => 'FIRST-ITEM', 'name' => 'first item', 'url' => 'first item url'), - 'SECOND-ITEM' => array('id' => 'SECOND-ITEM', 'name' => 'second item', 'url' => 'second item url'), - 'LAST-ITEM' => array('id' => 'LAST-ITEM', 'name' => 'last item', 'url' => 'last item url'), - ), //$expectedItems - ), - - array( - json_encode( - array( - 'previousPage' => null, - 'nextPage' => null, - 'items' => array(), - ) - ), //$responsePayload - null, //$expectedPreviousPageUrl - null, //$expectedNextPageUrl - array(), //$expectedItems - ), - ); - }" -DetailPagingServiceTest,* @var ArticleListApiInterface,"public function it_should_return_the_next_item($currentListPageURL, $currentItemId, $expectedListPageUrl, $expectedItemId) - { - $this->given_that_the_pager_is_in_spot('pagerSpotName'); - $this->given_that_the_list_is_in_spot('spotname'); - $this->given_an_article_list_with($this->listResults); - $this->given_a_request_url_for_the_current_list_page($currentListPageURL); - $this->given_a_paging_service(); - $this->when_we_call_getNextItem_with($currentItemId); - $this->then_we_should_get_an_item_matching($expectedItemId); - if (null !== $expectedItemId) { - $this->the_returned_items_url_should_contain_the_paging_module_relevant_parameters($expectedListPageUrl); - }" -DetailPagingServiceTest,* @var DetailPagingService,"public function it_should_return_the_previous_item($currentListPageURL, $currentItemId, $expectedListPageUrl, $expectedItemId) - { - $this->given_that_the_pager_is_in_spot('pagerSpotName'); - $this->given_that_the_list_is_in_spot('spotname'); - $this->given_an_article_list_with($this->listResults); - $this->given_a_request_url_for_the_current_list_page($currentListPageURL); - $this->given_a_paging_service(); - $this->when_we_call_getPreviousItem_with($currentItemId); - $this->then_we_should_get_an_item_matching($expectedItemId); - if (null !== $expectedItemId) { - $this->the_returned_items_url_should_contain_the_paging_module_relevant_parameters($expectedListPageUrl); - }" -DetailPagingServiceTest,* @var ListItemInterface,"public function it_should_return_the_back_to_list_link() - { - $this->given_that_the_pager_is_in_spot('pagerSpotName'); - $this->given_that_the_list_is_in_spot('spotname'); - $this->given_an_article_list_with($this->listResults); - $this->given_a_request_url_for_the_current_list_page('current-list-request-url'); - $this->given_a_paging_service(); - $this->when_we_call_getBackToListUrl(); - $this->then_we_should_get_a_return_url_matching('current-list-request-url'); - }" -DetailPagingServiceTest,* @var ListResultInterface[],"public function dataProviderListResultForNextItem() - { - return array( - array( - 'firstPageUrl', - 'page0-FIRST-ITEM', - 'firstPageUrl', - 'page0-SECOND-ITEM', - ), - array( - 'firstPageUrl', - 'page0-INNER-ITEM', - 'firstPageUrl', - 'page0-INNER-ITEM-RIGHT', - ), - array( - 'firstPageUrl', - 'page0-LAST-ITEM', - 'secondPageUrl', - 'page1-FIRST-ITEM', - ), - - array( - 'secondPageUrl', - 'page1-FIRST-ITEM', - 'secondPageUrl', - 'page1-SECOND-ITEM', - ), - array( - 'secondPageUrl', - 'page1-INNER-ITEM', - 'secondPageUrl', - 'page1-INNER-ITEM-RIGHT', - ), - array( - 'secondPageUrl', - 'page1-LAST-ITEM', - 'thirdPageUrl', - 'page2-FIRST-ITEM', - ), - - array( - 'thirdPageUrl', - 'page2-FIRST-ITEM', - 'thirdPageUrl', - 'page2-SECOND-ITEM', - ), - array( - 'thirdPageUrl', - 'page2-INNER-ITEM', - 'thirdPageUrl', - 'page2-INNER-ITEM-RIGHT', - ), - array( - 'thirdPageUrl', - 'page2-LAST-ITEM', - null, - null, - ), - ); - }" -DetailPagingServiceTest,"* @test - * @dataProvider dataProviderListResultForNextItem - * - * @param string $currentItemId - * @param ListItemInterface $expectedItem","public function dataProviderListResultForPreviousItem() - { - return array( - array( - 'firstPageUrl', - 'page0-FIRST-ITEM', - null, - null, - ), - array( - 'firstPageUrl', - 'page0-INNER-ITEM', - 'firstPageUrl', - 'page0-INNER-ITEM-LEFT', - ), - array( - 'firstPageUrl', - 'page0-LAST-ITEM', - 'firstPageUrl', - 'page0-SECOND-LAST-ITEM', - ), - - array( - 'secondPageUrl', - 'page1-FIRST-ITEM', - 'firstPageUrl', - 'page0-LAST-ITEM', - ), - array( - 'secondPageUrl', - 'page1-INNER-ITEM', - 'secondPageUrl', - 'page1-INNER-ITEM-LEFT', - ), - array( - 'secondPageUrl', - 'page1-LAST-ITEM', - 'secondPageUrl', - 'page1-SECOND-LAST-ITEM', - ), - - array( - 'thirdPageUrl', - 'page2-FIRST-ITEM', - 'secondPageUrl', - 'page1-LAST-ITEM', - ), - array( - 'thirdPageUrl', - 'page2-INNER-ITEM', - 'thirdPageUrl', - 'page2-INNER-ITEM-LEFT', - ), - array( - 'thirdPageUrl', - 'page2-LAST-ITEM', - 'thirdPageUrl', - 'page2-SECOND-LAST-ITEM', - ), - ); - }" -RequestToListUrlConverterTest,* @var InputFilterUtilInterface,"public function it_should_return_the_list_url_from_parameter() - { - $this->given_the_referrer('myreferer'); - $this->given_the_request_parameters(array('url' => 'listurl')); - $this->given_an_input_filter_util(); - $this->given_an_instance_of_the_converter_with_the_current_request_stack(); - $this->when_we_call_getListUrl(); - $this->then_we_should_get_the_list_url('listurl'); - }" -RequestToListUrlConverterTest,* @var \ChameleonSystem\ShopArticleDetailPagingBundle\Bridge\Service\RequestToListUrlConverter,"public function it_should_return_the_list_spot_name() - { - $this->given_the_referrer('myreferer'); - $this->given_the_request_parameters(array('_ref' => 'myspotname')); - $this->given_an_input_filter_util(); - $this->given_an_instance_of_the_converter_with_the_current_request_stack(); - $this->when_we_call_getListSpotName(); - $this->then_we_should_get_the_spot_name('myspotname'); - }" -RequestToListUrlConverterTest,* @var array,"public function it_should_return_the_pager_relevant_query_parameter($listSpotName, $listPageUrl, $expectedPagerParameter) - { - $this->given_the_list_spot($listSpotName); - $this->given_the_request_parameters(array('_ref' => $listSpotName)); - $this->given_an_input_filter_util(); - $this->given_an_instance_of_the_converter_with_the_current_request_stack(); - $this->when_we_call_getPagerParameter_with($listPageUrl); - $this->then_we_expect_to_get_pager_parameter_matching($expectedPagerParameter); - }" -RequestToListUrlConverterTest,* @var array,"public function dataProviderGetPagerQueryParameter() - { - return array( - array( - 'listSpotName', - 'http://mydomain.tld/my/path?some=query#marker', //$listPageUrl - array( - RequestToListUrlConverterInterface::URL_PARAMETER_SPOT_NAME => 'listSpotName', - RequestToListUrlConverterInterface::URL_PARAMETER_LIST_URL => 'http://mydomain.tld/my/path?some=query#marker', - ), //$expectedPagerParameter - ), - ); - }" -TPkgShopArticlePreorder,"* send email to users email for the given article. - * - * @param TShopArticle $oArticle - * @param string $sEmail - * - * @return bool","public function SendMail($oArticle = null, $sEmail = '') - { - // ------------------------------------------------------------------------ - static $aPortals = array(); - if (null === $oArticle) { - $oArticle = $this->GetFieldShopArticle(); - }" -TPkgShopArticlePreorder,@psalm-suppress InvalidPassByReference,"public function SaveNewPreorder($sArticleId = '') - { - // ------------------------------------------------------------------------ - $oGlobal = TGlobal::instance(); - $oMsgManager = TCMSMessageManager::GetInstance(); - if ($oGlobal->userDataExists('eMail') && TTools::IsValidEMail($oGlobal->GetuserData('eMail')) && !$oShopArticlePreorder = TdbShopArticlePreorder::LoadFromFields(array('shop_article_id' => $sArticleId, 'preorder_user_email' => $oGlobal->GetuserData('eMail')))) { - $activePortal = $this->getPortalDomainService()->getActivePortal(); - $aPostData = array('shop_article_id' => $sArticleId, 'preorder_user_email' => $oGlobal->GetuserData('eMail'), 'preorder_date' => date('Y-m-d H:i:s'), 'cms_portal_id' => $activePortal->id); - $this->LoadFromRow($aPostData); - $this->AllowEditByAll(true); - $this->Save(); - $this->AllowEditByAll(false); - $oMsgManager->AddMessage('mail-preorder-form-eMail', 'SUCCESS-USER-SIGNUP-PREORDER-ARTICLE'); - - return true; - }" -TPkgShopArticlePreorder_ShopArticle,"* hook called when the stock value of the article changed. - * - * @param float $dOldValue - * @param float $dNewValue - * - * @return void - * - * @psalm-suppress AssignmentToVoid, NullableReturnStatement, InvalidReturnStatement - * @FIXME Saving void return value of parent call.","public function IsBuyable() - { - // ------------------------------------------------------------------------ - $bIsBuyable = parent::IsBuyable(); - if (true === $bIsBuyable) { - if ($this->fieldShowPreorderOnZeroStock && $this->getAvailableStock() < 1) { - $bIsBuyable = false; - }" -MTPkgShopArticlePreorder_ShopCentralHandlerCore,"* add your custom methods as array to $this->methodCallAllowed here - * to allow them to be called from web.","public function PreorderArticle() - { - $oGlobal = TGlobal::instance(); - if ($oGlobal->UserDataExists('user_email')) { - $sUserEmail = $oGlobal->GetUserData('user_email'); - if (TTools::IsValidEMail($sUserEmail)) { - $oActiveArticle = TdbShop::GetActiveItem(); - if ($oActiveArticle) { - $oActivePortal = $this->getPortalDomainService()->getActivePortal(); - $aData = array('shop_article_id' => $oActiveArticle->id, 'preorder_user_email' => $sUserEmail, 'cms_portal_id' => $oActivePortal->id); - $oPreorder = TdbPkgShopArticlePreorder::GetNewInstance(); - if ($oPreorder->LoadFromFields($aData)) { - //do nothing, article already preordered by this email - }" -TPkgShopArticleReviewMapper_Module,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapperVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oReviewModuleConfiguration TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration */ - $oReviewModuleConfiguration = $oVisitor->GetSourceObject('oReviewModuleConfiguration'); - if ($oReviewModuleConfiguration && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oReviewModuleConfiguration->table, $oReviewModuleConfiguration->id); - }" -TPkgShopArticleReviewMapper_Module,@var $oReviewModuleConfiguration TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oReviewModuleConfiguration', 'TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration'); - $oRequirements->NeedsSourceObject('sShowAllReviews', ''); - $oRequirements->NeedsSourceObject('bAllowWriteReview', ''); - $oRequirements->NeedsSourceObject('sLoginHtml', ''); - $oRequirements->NeedsSourceObject('sWriteReviewHtml', null, ''); - $oRequirements->NeedsSourceObject('sWriteReviewHideOnJS', null, ''); - $oRequirements->NeedsSourceObject('bFieldErrors'); - $oRequirements->NeedsSourceObject('sLoginHideOnJS', null, ''); - }" -TPkgShopArticleReviewMapper_Write,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapperVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $aUserReviewData = $oVisitor->GetSourceObject('aUserReviewData'); - /** @var $oUser TdbDataExtranetUser */ - $oUser = $oVisitor->GetSourceObject('oUser'); - $aWriteReviewData = array(); - $aFieldUserName = array(); - $aFieldUserName['sError'] = $this->GetMessageForField('author_name'); - $aFieldUserName['sValue'] = $this->GetValueForField('author_name', $aUserReviewData); - $oVisitor->SetMappedValue('aFieldUserName', $aFieldUserName); - - $aFieldTitle = array(); - $aFieldTitle['sError'] = $this->GetMessageForField('title'); - $aFieldTitle['sValue'] = $this->GetValueForField('title', $aUserReviewData); - $oVisitor->SetMappedValue('aFieldTitle', $aFieldTitle); - - $aFieldRating = array(); - $aFieldRating['sError'] = $this->GetMessageForField('rating'); - $aFieldRating['sValue'] = $this->GetValueForField('rating', $aUserReviewData); - $oVisitor->SetMappedValue('aFieldRating', $aFieldRating); - - $aFieldText = array(); - $aFieldText['sError'] = $this->GetMessageForField('comment'); - $aFieldText['sValue'] = $this->GetValueForField('comment', $aUserReviewData); - $oVisitor->SetMappedValue('aFieldText', $aFieldText); - - $sSpotName = $oVisitor->GetSourceObject('sSpotName'); - $oVisitor->SetMappedValue('sSpotName', $sSpotName); - $sUserId = $oUser->id; - $oVisitor->SetMappedValue('sUserId', $sUserId); - $sUserEmail = $oUser->fieldEmail; - $oVisitor->SetMappedValue('sUserEmail', $sUserEmail); - }" -TPkgShopArticleReviewMapper_Write,@var $oUser TdbDataExtranetUser,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('sSpotName'); - $oRequirements->NeedsSourceObject('aUserReviewData', 'array'); - $oRequirements->NeedsSourceObject('oUser', 'TdbDataExtranetUser'); - }" -TPkgCommentTypePkgShopArticleReview,* @return string,"public function GetActiveItemId() - { - return ''; - }" -TPkgShopArticleReviewShopArticleReview,"* Returns URL to rate a comment. - * - * @param bool $bPositiveLink Set if you want the url to rate a review positive or negative - * @param bool $bUseFullUrl - * - * @return string","public function GetRateURL($bPositiveLink = true, $bUseFullUrl = false) - { - if ($bPositiveLink) { - $bPositiveLink = '1'; - }" -TPkgShopArticleReviewShopArticleReview,"* Returns true or false if active user rated review. - * - * @return bool","public function ReviewRatedByActiveUser() - { - return array_key_exists('TPkgShopArticleReviewShopArticleReviewRated', $_SESSION) && array_key_exists($this->id, $_SESSION['TPkgShopArticleReviewShopArticleReviewRated']); - }" -TPkgShopArticleReviewShopArticleReview,"* vote the review up or down. - * - * @param bool $bRateUp - * - * @return void","public function RateReview($bRateUp = true) - { - if (false == $this->ReviewRatedByActiveUser()) { - $sRateString = 'helpful_count'; - //helpful_count - //not_helpful_count - if (false == $bRateUp) { - $sRateString = 'not_helpful_count'; - }" -TPkgShopArticleReviewShopArticleReview,"* Returns the URL to report a review. - * - * @param bool $bUseFullUrl - * - * @return string","public function GetReportURL($bUseFullUrl = false) - { - $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); - $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('ReportReview', $aParameter, $bUseFullUrl); - - return $sReportLink; - }" -TPkgShopArticleReviewShopArticleReview,"* Returns URL to change report notification state for a review. - * - * @param bool $bUseFullUrl - * - * @return string","public function GetChangeReviewReportNotificationStateURL($bUseFullUrl = false) - { - $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); - $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('ChangeReviewReportNotificationState', $aParameter, $bUseFullUrl); - - return $sReportLink; - }" -TPkgShopArticleReviewShopArticleReview,"* Returns the URL to delete a review. - * - * @param bool $bUseFullUrl - * - * @return string","public function GetDeleteURL($bUseFullUrl = false) - { - $aParameter = array(TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id); - $sReportLink = TTools::GetExecuteMethodOnCurrentModuleURL('DeleteReview', $aParameter, $bUseFullUrl); - - return $sReportLink; - }" -TPkgShopArticleReviewShopArticleReview,"* send a review notification to the shop owner. - * - * @return void","public function SendReviewReportNotification() - { - $this->SaveActionIdToComment(); - $oMail = TDataMailProfile::GetProfile('report-review'); - $aData = array(); - $oShop = TdbShop::GetInstance(); - $oArticle = $this->GetFieldShopArticle(); - $aData['sArticleName'] = $oArticle->GetName(); - $aData['sReviewId'] = $this->id; - $aData['sReviewTitle'] = $this->fieldTitle; - $aData['sReviewText'] = $this->fieldComment; - $aData['sReviewAuthor'] = $this->fieldAuthorName; - $aData['sUnlockReviewLink'] = """".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.publish_comment')).' '; - $aData['sDeleteReviewLink'] = """".TGlobal::OutHtml(TGlobal::Translate('chameleon_system_shop_article_review.action.delete_comment')).' '; - $aData['shopname'] = $oShop->GetName(); - $oMail->AddDataArray($aData); - $oMail->SendUsingObjectView('emails', 'Customer'); - }" -TPkgShopArticleReviewShopArticleReview,"* Send comment notification to review owner. - * Send comment notification to owner only if owner set the option for the review. - * - * @param TdbPkgComment $oComment - * - * @return void","public function SendReviewCommentNotification($oComment) - { - if ($this->AllowSendAuthorReviewCommentNotification()) { - $sAuthorEmail = $this->GetSendReviewCommentNotificationEmail(); - if (TTools::IsValidEMail($sAuthorEmail)) { - $oMail = TDataMailProfile::GetProfile('review-comment'); - $aData = array(); - $oArticle = $this->GetFieldShopArticle(); - $aData['sArticleName'] = $oArticle->GetName(); - $aData['sReviewTitle'] = $this->fieldTitle; - $aData['sReviewText'] = $this->fieldComment; - $aData['sCommentText'] = $oComment->fieldComment; - $oMail->AddDataArray($aData); - $oMail->ChangeToAddress($this->fieldAuthorEmail, $this->fieldAuthorName); - $oMail->SendUsingObjectView('emails', 'Customer'); - }" -MTPkgShopArticleReviewCore,"* used to show and write article reviews. -/*","public function Init() - { - parent::Init(); - $this->GetModuleConfiguration(); - $this->data['aUserData'] = $this->SetDefaultFieldVars(); - }" -MTPkgShopArticleReviewCore,@var TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration,"public function Execute() - { - $this->data = parent::Execute(); - $this->data['oActiveArticle'] = null; - $this->data['oActiveCategory'] = null; - $this->data['oReviewList'] = $this->GetReviews(); - $this->data['sCaptchaQuestion'] = $this->GenerateCaptcha(); - $oModuleConfiguration = $this->GetModuleConfiguration(); - $this->data['oModuleConfiguration'] = $oModuleConfiguration; - $this->data['bAllowWriteReview'] = $this->AllowWriteReview(); - $this->data['bAllowReadReview'] = $this->AllowReadReview(); - $this->data['bNeedUserFieldForName'] = $this->NeedUserFieldForName(); - $this->data['iRatingStars'] = $oModuleConfiguration->fieldRatingCount; - $this->data['bAllowRateReviews'] = $this->AllowRateReviews(); - $this->data['bAllowReportReviews'] = $this->AllowReportReviews(); - $this->data['oPkgCommentModuleConfig'] = $this->GetPkgCommentModuleConfiguration(); - $this->data['iShowReviewsOnStart'] = $oModuleConfiguration->fieldCountShowReviews; - - return $this->data; - }" -MTPkgShopArticleReviewCore,@var string|false,"public function _CallMethod($sMethodName, $aMethodParameter = array()) - { - $functionResult = null; - if (true === \method_exists($this, $sMethodName)) { - $functionResult = parent::_CallMethod($sMethodName); - }" -MTPkgShopArticleReviewCore,"* called before any external functions get called, but after the constructor.","public function AllowAccessWithoutAuthenticityToken($sMethodName) - { - $bAllow = parent::AllowAccessWithoutAuthenticityToken($sMethodName); - if (false === $bAllow) { - if ('DeleteReview' == $sMethodName) { - $bAllow = true; - }" -MTPkgShopArticleReviewCore,"* Set default form parameter with init value or post values. - * - * @return array","public function ChangeReviewReportNotificationState() - { - $oGlobal = TGlobal::instance(); - $oMsgManager = TCMSMessageManager::GetInstance(); - if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) { - $oReviewItem = TdbShopArticleReview::GetNewInstance(); - if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) && $oReviewItem->IsOwner()) { - $sReviewReportNotificationState = $oReviewItem->fieldSendCommentNotification; - if ($sReviewReportNotificationState) { - $sReviewReportNotificationState = 0; - }" -MTPkgShopArticleReviewCore,"* Returns virtual comment module config. Was needed to comment reviews - * note: this function will be used only if package pkg comment was installed. - * - * @return TdbPkgCommentModuleConfig|null","public function DeleteReview() - { - $oGlobal = TGlobal::instance(); - $oMsgManager = TCMSMessageManager::GetInstance(); - if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_ACTION_ID)) { - $this->DeleteReviewFromActionId(); - }" -MTPkgShopArticleReviewCore,"* @psalm-suppress InvalidPropertyAssignmentValue - * @FIXME field is `bool` but assigned `int` - This could yield unwanted behaviour, especially with strict checks","public function ReportReview() - { - $oGlobal = TGlobal::instance(); - $oMsgManager = TCMSMessageManager::GetInstance(); - if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $this->AllowReportReviews()) { - $oReviewItem = TdbShopArticleReview::GetNewInstance(); - if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) { - if (0 != $oReviewItem->sqlData['publish'] && '0' != $oReviewItem->sqlData['publish']) { - $oReviewItem->sqlData['publish'] = 0; - $oReviewItem->AllowEditByAll(true); - $oReviewItem->Save(); - $oReviewItem->SendReviewReportNotification(); - $oArticle = TdbShop::GetActiveItem(); - if ($oArticle->IsVariant()) { - $oArticle = $oArticle->GetFieldVariantParent(); - }" -MTPkgShopArticleReviewCore,"* @psalm-suppress InvalidPropertyAssignmentValue - * @FIXME field is `bool` but assigned `int` - This could yield unwanted behaviour, especially with strict checks","public function RateReview() - { - $oGlobal = TGlobal::instance(); - $oMsgManager = TCMSMessageManager::GetInstance(); - $oReviewItem = TdbShopArticleReview::GetNewInstance(); - if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) { - if ($this->AllowRateReviews() && $oGlobal->UserDataExists('bRate') && $oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) { - $bRate = $oGlobal->GetUserData('bRate'); - if ($bRate) { - $oReviewItem->RateReview(true); - }" -MTPkgShopArticleReviewCore,"* @psalm-suppress UndefinedPropertyAssignment - * @FIXME Does `fieldCountShowReviews` exist?","public function EditReview() - { - $oGlobal = TGlobal::instance(); - $oMsgManager = TCMSMessageManager::GetInstance(); - if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $oGlobal->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) { - $oEditReview = TdbShopArticleReview::GetNewInstance(); - if ($oEditReview->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) { - $aUserData = $oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME); - foreach ($aUserData as $sKey => $sValue) { - $oEditReview->sqlData[$sKey] = $sValue; - }" -MTPkgShopArticleReviewCore,"* @psalm-suppress UndefinedPropertyAssignment - * @FIXME Does `fieldAllowReportComments` exist?","public function WriteReview() - { - //validate user input... - $oGlobal = TGlobal::instance(); - $aUserData = array(); - if ($this->AllowWriteReview()) { - $aUserData = $this->GetReviewWriteData(); - $oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME); - if ($this->ValidateWriteReviewData($aUserData)) { - $oArticle = $this->GetArticleToReview(); - $oReviewItem = $this->CreateReview($aUserData, $oArticle); - $oArticle->UpdateStatsReviews(); - $oReviewItem->SendNewReviewNotification(); - $oMsgManager = TCMSMessageManager::GetInstance(); - $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'ARTICLE-REVIEW-SUBMITTED', $aUserData); - $this->RedirectToItemPage(); - }" -MTPkgShopArticleReviewCore,"* Checks if its allowed to write a comment to a review. - * Returns always false if package pkgcomment was not installed. - * - * @return bool","public function _AllowCache() - { - return false; - }" -MTPkgShopArticleReviewCore,"* Get the comment type for article reviews. - * - * @return string","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('common/userInput/form')); - $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('common/lists')); - - return $aIncludes; - }" -ChameleonSystemShopBundle,* @return void,"public function build(ContainerBuilder $container) - { - $container->addCompilerPass(new ArticleListPass()); - $container->addCompilerPass(new CollectPaymentConfigProvidersPass()); - }" -BasketProductAmountValidator,* {@inheritdoc},"public function isAmountValid(TdbShopArticle $product, $requestedAmount) - { - if (false === is_numeric($requestedAmount)) { - return false; - }" -BasketVariableReplacer,"* BasketVariableReplacer is used to add all request parameters as hidden fields to ""Add to Basket""-forms. - * This happens as a post process job to avoid caching those parameters. - * - * To successfully use it on a page the template for the basket button must include a placeholder in the form of: - * - * [{BASKETHIDDENFIELDS}] - * - * Background: the additional fields are added so that those parameters from the url do not get lost on the redirect - * after the POST call to the server. - * As we do not know which parameters might be needed by other modules on the page we must add all of them. - * This isn't a security concern as the page has already been called with those parameters in the first place.","public function __construct( - Environment $twigEnvironment, - RequestStack $requestStack, - LoggerInterface $logger - ) - { - $this->twigEnvironment = $twigEnvironment; - $this->logger = $logger; - $this->requestStack = $requestStack; - }" -BasketVariableReplacer,* @var Environment,"public function filterResponse(FilterContentEvent $event): void - { - $content = $event->getContent(); - if (false === strpos($content, self::BASKET_HIDDEN_FIELDS_PLACEHOLDER)) { - return; - }" -PaymentMethodDataAccess,* @var Connection,"public function __construct(Connection $connection) - { - $this->connection = $connection; - }" -PaymentMethodDataAccess,* @param Connection $connection,"public function getShippingCountryIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_data_country_mlt', $paymentMethodId); - }" -PaymentMethodDataAccess,* {@inheritdoc},"public function getBillingCountryIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_data_country_billing_data_country_mlt', $paymentMethodId); - }" -PaymentMethodDataAccess,* {@inheritdoc},"public function getPermittedUserIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_data_extranet_user_mlt', $paymentMethodId); - }" -PaymentMethodDataAccess,* {@inheritdoc},"public function getPermittedUserGroupIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_data_extranet_group_mlt', $paymentMethodId); - }" -PaymentMethodDataAccess,* {@inheritdoc},"public function getPermittedArticleIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_shop_article_mlt', $paymentMethodId); - }" -PaymentMethodDataAccess,* {@inheritdoc},"public function getPermittedCategoryIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_shop_category_mlt', $paymentMethodId); - }" -PaymentMethodDataAccess,* {@inheritdoc},"public function getPermittedArticleGroupIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_shop_article_group_mlt', $paymentMethodId); - }" -PaymentMethodDataAccess,* {@inheritdoc},"public function getInvalidArticleIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_shop_article1_mlt', $paymentMethodId); - }" -PaymentMethodDataAccess,* {@inheritdoc},"public function getInvalidCategoryIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_shop_category1_mlt', $paymentMethodId); - }" -PaymentMethodDataAccess,* {@inheritdoc},"public function getInvalidArticleGroupIds($paymentMethodId) - { - return $this->getIdsFromMlt('shop_payment_method_shop_article_group1_mlt', $paymentMethodId); - }" -ShopCategoryDataAccess,* @var Connection,"public function __construct(Connection $connection) - { - $this->connection = $connection; - }" -ShopCategoryDataAccess,* @param Connection $connection,"public function getAllActive() - { - $activeRestriction = $this->getActiveRestriction(); - $query = 'SELECT * FROM `shop_category`'; - if ('' !== $activeRestriction) { - $query = $query.' WHERE '.$activeRestriction; - }" -ShopCategoryDataAccess,* {@inheritdoc},"public function getActiveChildren($categoryId) - { - $query = 'SELECT * FROM `shop_category` WHERE `shop_category_id` = :parentId %s ORDER BY `position`'; - $activeRestriction = $this->getActiveRestriction(); - if ('' !== $activeRestriction) { - $activeRestriction = ' AND '.$activeRestriction; - }" -ShopCategoryDataAccess,* {@inheritdoc},"public function getCategory($categoryId) - { - $query = 'SELECT * FROM `shop_category` WHERE `shop_category_id` = :categoryId'; - $row = $this->connection->fetchAllAssociative($query, array('categoryId' => $categoryId)); - if (false === $row) { - return null; - }" -ShopShippingGroupDataAccess,* @var Connection,"public function __construct(Connection $connection) - { - $this->connection = $connection; - }" -ShopShippingGroupDataAccess,* @param Connection $connection,"public function getPermittedUserIds($shippingGroupId) - { - return $this->getIdsFromMlt('shop_shipping_group_data_extranet_user_mlt', $shippingGroupId); - }" -ShopShippingGroupDataAccess,* {@inheritdoc},"public function getPermittedUserGroupIds($shippingGroupId) - { - return $this->getIdsFromMlt('shop_shipping_group_data_extranet_group_mlt', $shippingGroupId); - }" -ShopShippingGroupDataAccess,* {@inheritdoc},"public function getPermittedPortalIds($shippingGroupId) - { - return $this->getIdsFromMlt('shop_shipping_group_cms_portal_mlt', $shippingGroupId); - }" -ShopShippingTypeDataAccess,* @var Connection,"public function __construct(Connection $connection) - { - $this->connection = $connection; - }" -ShopShippingTypeDataAccess,* @param Connection $connection,"public function getPermittedArticleGroupIds($shippingTypeId) - { - return $this->getIdsFromMlt('shop_shipping_type_shop_article_group_mlt', $shippingTypeId); - }" -ShopShippingTypeDataAccess,* {@inheritdoc},"public function getPermittedArticleIds($shippingTypeId) - { - return $this->getIdsFromMlt('shop_shipping_type_shop_article_mlt', $shippingTypeId); - }" -ShopShippingTypeDataAccess,* {@inheritdoc},"public function getPermittedCategoryIds($shippingTypeId) - { - return $this->getIdsFromMlt('shop_shipping_type_shop_category_mlt', $shippingTypeId); - }" -ShopShippingTypeDataAccess,* {@inheritdoc},"public function getPermittedPortalIds($shippingTypeId) - { - return $this->getIdsFromMlt('shop_shipping_type_cms_portal_mlt', $shippingTypeId); - }" -ShopShippingTypeDataAccess,* {@inheritdoc},"public function getPermittedCountryIds($shippingTypeId) - { - return $this->getIdsFromMlt('shop_shipping_type_data_country_mlt', $shippingTypeId); - }" -ShopShippingTypeDataAccess,* {@inheritdoc},"public function getPermittedUserGroupIds($shippingTypeId) - { - return $this->getIdsFromMlt('shop_shipping_type_data_extranet_group_mlt', $shippingTypeId); - }" -ShopShippingTypeDataAccess,* {@inheritdoc},"public function getPermittedUserIds($shippingTypeId) - { - return $this->getIdsFromMlt('shop_shipping_type_data_extranet_user_mlt', $shippingTypeId); - }" -ShopShippingTypeDataAccess,* {@inheritdoc},"public function getAvailableShippingTypes($shippingGroupId, $shippingCountryId, TShopBasket $basket) - { - $parameters = array( - 'iGroupId' => $shippingGroupId, - 'dNumberOfArticles' => $basket->dTotalNumberOfArticles, - 'dWeight' => $basket->dTotalWeight, - 'dBasketVolume' => $basket->dTotalVolume, - 'dBasketValue' => $basket->dCostArticlesTotalAfterDiscounts, - ); - if ('' !== $shippingCountryId) { - $parameters['sActiveShippingCountryId'] = $shippingCountryId; - }" -ShopStockMessageDataAccess,* @var Connection,"public function __construct(Connection $databaseConnection) - { - $this->databaseConnection = $databaseConnection; - }" -ShopStockMessageDataAccess,* @param Connection $databaseConnection,"public function getStockMessage($id, $languageId) - { - $message = TdbShopStockMessage::GetNewInstance($id, $languageId); - - if (false === $message->sqlData) { - return null; - }" -ShopStockMessageDataAccess,* {@inheritdoc},"public function getAll() - { - $rows = $this->databaseConnection->fetchAllAssociative('SELECT * FROM `shop_stock_message`'); - - return array_reduce( - $rows, - function (array $carry, array $row) { - $carry[$row['id']] = $row; - - return $carry; - }" -SearchSuggestController,* @var ShopSearchSuggestInterface,"public function __construct(ShopSearchSuggestInterface $shopSearchSuggest) - { - $this->shopSearchSuggest = $shopSearchSuggest; - }" -SearchSuggestController,* @param ShopSearchSuggestInterface $shopSearchSuggest,"public function __invoke(Request $request) - { - $suggestions = $this->shopSearchSuggest->getSearchSuggestions($request->query->get('query')); - $retValue = array( - 'options' => $suggestions, - ); - - $response = new Response(json_encode($retValue)); - $response->headers->set('Content-Type', 'application/json'); - - return $response; - }" -ChameleonSystemShopExtension,"* {@inheritdoc} - * - * @return void","public function load(array $config, ContainerBuilder $container) - { - $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('cronjobs.xml'); - $loader->load('logging.xml'); - $loader->load('mappers.xml'); - $loader->load('services.xml'); - }" -ChameleonSystemShopExtension,"* {@inheritdoc} - * - * @return void","public function prepend(ContainerBuilder $container) - { - $container->prependExtensionConfig('monolog', ['channels' => ['order', 'order_payment_ipn']]); - }" -ArticleListPass,"* You can modify the container here before it is dumped to PHP code. - * - * @param ContainerBuilder $container - * - * @api - * - * @return void","public function process(ContainerBuilder $container) - { - $this->registerStateExtractors($container); - $this->registerStateElements($container); - $this->registerResultModifications($container); - }" -CollectPaymentConfigProvidersPass,"* CollectPaymentConfigProvidersPass collects services that provide additional configuration - * for payment groups. For each payment handler group a single configuration provider can be specified - * by adding a tag ""chameleon_system_shop.payment_config_provider"" to the service definition.","public function process(ContainerBuilder $container) - { - $taggedServices = $container->findTaggedServiceIds('chameleon_system_shop.payment_config_provider'); - - $loaderDefinition = $container->getDefinition('chameleon_system_shop.payment.config_loader'); - - foreach ($taggedServices as $serviceId => $attributes) { - $systemName = null; - foreach ($attributes as $tag) { - foreach ($tag as $key => $value) { - if ('system_name' === $key) { - $systemName = $value; - }" -UpdateProductStockEvent,* @var string,"public function __construct($productId, $newStock, $oldStock) - { - $this->productId = $productId; - $this->newStock = $newStock; - $this->oldStock = $oldStock; - }" -UpdateProductStockEvent,* @var int,"public function getProductId() - { - return $this->productId; - }" -UpdateProductStockEvent,* @var int,"public function getNewStock() - { - return $this->newStock; - }" -UpdateProductStockEvent,"* @param string $productId - * @param int $newStock - * @param int $oldStock","public function getOldStock() - { - return $this->oldStock; - }" -UpdateProductStatisticsListener,* @var ProductStatisticsServiceInterface,"public function __construct(ProductStatisticsServiceInterface $productStatisticsService) - { - $this->productStatisticsService = $productStatisticsService; - }" -UpdateProductStatisticsListener,* @param ProductStatisticsServiceInterface $productStatisticsService,"public function onUpdateProductStock(UpdateProductStockEvent $event) - { - $productId = $event->getProductId(); - $product = TdbShopArticle::GetNewInstance($productId); - $isVariant = $product->IsVariant(); - if (!$isVariant && !$product->HasVariants()) { - return; - }" -UpdateVariantParentStockListener,* @var ProductInventoryServiceInterface,"public function __construct(ProductInventoryServiceInterface $productInventoryService) - { - $this->productInventoryService = $productInventoryService; - }" -UpdateVariantParentStockListener,* @param ProductInventoryServiceInterface $productInventoryService,"public function onUpdateProductStock(UpdateProductStockEvent $event) - { - $productId = $event->getProductId(); - $product = TdbShopArticle::GetNewInstance($productId); - $isVariant = $product->IsVariant(); - if (!$isVariant && !$product->HasVariants()) { - return; - }" -,* BasketProductAmountValidatorInterface checks if a certain amount of products may be added to a basket.,"public function isAmountValid(TdbShopArticle $product, $requestedAmount); -}" -,"* validates the custom data. - * - * @param array $customData - * - * @return TShopBasketArticleCustomDataValidationError[]","public function validateCustomData(array $customData); - - /** - * return true if the item may only be purchased if custom data is present (and valid). - * - * @return bool - */ - public function requiresCustomData(); - - /** - * return true if the article is configurable (and therefor accepts custom data). Since any extension of the TShopBasketArticle class - * affects every article we need each article to be able to decided if it is a configurable article or not. - * - * @return bool - */ - public function isConfigurableArticle(); - - /** - * return the twig template to use when displaying custom data. - * - * @return string - */ - public function getCustomDataTwigTemplate(); - - /** - * @return array - */ - public function getCustomDataForTwigOutput(); -}" -,"* return the twig template to use when displaying custom data. - * - * @return string","public function getCustomDataTwigTemplate(); - - /** - * @return array - */ - public function getCustomDataForTwigOutput(); - - /** - * @return array - */ - public function getCustomData(); -}" -,"* Interface IPkgShopPaymentHandlerCustomConfirmOrderBlockInterface - * if a payment handler implements this interface, then renderConfirmOrderBlock will be called to show a custom confirm text - * in the order confirm step and the response will be processed via processConfirmOrderUserResponse.","public function renderConfirmOrderBlock(TdbShopPaymentMethod $paymentMethod, TdbDataExtranetUser $user); - - /** - * @param TdbShopPaymentMethod $paymentMethod - * @param TdbDataExtranetUser $user - * @param array $userData - * - * @return bool - */ - public function processConfirmOrderUserResponse(TdbShopPaymentMethod $paymentMethod, TdbDataExtranetUser $user, $userData); -}" -,* PaymentInfoServiceInterface defines a service that provides information on payments.,"public function isPaymentMethodActive($paymentMethodInternalName, \TdbCmsPortal $portal = null); -}" -,"* @param \TdbShopArticle $shopArticle - * @param array $typeSelection - key => value pairs identifying a specific variant type selection (shop_variant_type => shop_variant_type_value) - * @return \TdbShopArticle","public function getProductBasedOnSelection(\TdbShopArticle $shopArticle, array $typeSelection): \TdbShopArticle; -}" -,"* allows you to create an instance of a shop article based on the identification token passed in the shop url - * Interface ShopRouteArticleFactoryInterface.","public function createArticleFromIdentificationToken($identificationToken); -}" -,"* @param string $searchTerm - * - * @return string[]","public function getSearchSuggestions($searchTerm); -}" -,"* @return TdbShop - * - * @throws ErrorException","public function getActiveShop(); - - /** - * @param bool $useRedirect - * - * @return string - * - * @throws ErrorException - */ - public function getBasketLink($useRedirect = true); - - /** - * @param bool $useRedirect - * - * @return string - * - * @throws ErrorException - */ - public function getCheckoutLink($useRedirect = true); - - /** - * @param string $cmsPortalId - * - * @return TdbShop - * - * @throws ErrorException - */ - public function getShopForPortalId($cmsPortalId); - - /** - * @return string - * - * @throws ErrorException - */ - public function getId(); - - /** - * @return array - */ - public function getConfiguration(); - - /** - * @return TdbShopArticle|null - */ - public function getActiveProduct(); - - /** - * @return TdbShopCategory|null - */ - public function getActiveCategory(); - - /** - * @return TShopBasket|null - */ - public function getActiveBasket(); - - /** - * @return void - */ - public function resetBasket(); -}" -,* access payment method configuration.,"public function getShippingCountryIds($paymentMethodId); - - /** - * Return a list of billing countries for which the payment method is allowed. Empty array means no restriction. - * - * @param string $paymentMethodId - * - * @return array - */ - public function getBillingCountryIds($paymentMethodId); - - /** - * Return a list of user ids for which the payment is allowed. Empty array means no restriction. - * - * @param string $paymentMethodId - * - * @return array - */ - public function getPermittedUserIds($paymentMethodId); - - /** - * Return a list of user group ids for which the payment is allowed. Empty array means no restriction. - * - * @param string $paymentMethodId - * - * @return array - */ - public function getPermittedUserGroupIds($paymentMethodId); - - /** - * Return a list of product ids for which the payment is allowed. Empty array means no restriction. - * - * @param string $paymentMethodId - * - * @return array - */ - public function getPermittedArticleIds($paymentMethodId); - - /** - * Return a list of category ids for which the payment is allowed. Empty array means no restriction. - * - * @param string $paymentMethodId - * - * @return array - */ - public function getPermittedCategoryIds($paymentMethodId); - - /** - * Return a list of product group ids for which the payment is allowed. Empty array means no restriction. - * - * @param string $paymentMethodId - * - * @return array - */ - public function getPermittedArticleGroupIds($paymentMethodId); - - /** - * Return a list of product ids for which the payment is not allowed. Empty array means no restriction. - * - * @param string $paymentMethodId - * - * @return array - */ - public function getInvalidArticleIds($paymentMethodId); - - /** - * Return a list of category ids for which the payment is not allowed. Empty array means no restriction. - * - * @param string $paymentMethodId - * - * @return array - */ - public function getInvalidCategoryIds($paymentMethodId); - - /** - * Return a list of article group ids for which the payment is not allowed. Empty array means no restriction. - * - * @param string $paymentMethodId - * - * @return array - */ - public function getInvalidArticleGroupIds($paymentMethodId); -}" -,* access the shop category table.,"public function getAllActive(); - - /** - * Return all active children of a category. - * - * @param string $categoryId - * - * @return array - */ - public function getActiveChildren($categoryId); - - /** - * Returns a category. - * - * @param string $categoryId - * - * @return array|null - */ - public function getCategory($categoryId); -}" -,* provide access to the shipping group configuration.,"public function getPermittedUserIds($shippingGroupId); - - /** - * Returns a list of user group ids that may use the group. An empty array means no restriction. - * - * @param string $shippingGroupId - * - * @return array - */ - public function getPermittedUserGroupIds($shippingGroupId); - - /** - * Returns a list of portal ids that may use the group. An empty array means no restriction. - * - * @param string $shippingGroupId - * - * @return string[] - */ - public function getPermittedPortalIds($shippingGroupId); -}" -,* access shipping type configuration.,"public function getPermittedArticleGroupIds($shippingTypeId); - - /** - * Returns a list of article ids that may use the shipping type. An empty array means no restriction. - * - * @param string $shippingTypeId - * - * @return string[] - */ - public function getPermittedArticleIds($shippingTypeId); - - /** - * Returns a list of category ids that may use the shipping type. An empty array means no restriction. - * - * @param string $shippingTypeId - * - * @return string[] - */ - public function getPermittedCategoryIds($shippingTypeId); - - /** - * Returns a list of portal ids that may use the shipping type. An empty array means no restriction. - * - * @param string $shippingTypeId - * - * @return string[] - */ - public function getPermittedPortalIds($shippingTypeId); - - /** - * Returns a list of country ids that may use the shipping type. An empty array means no restriction. - * - * @param string $shippingTypeId - * - * @return string[] - */ - public function getPermittedCountryIds($shippingTypeId); - - /** - * Returns a list of user group ids that may use the shipping type. An empty array means no restriction. - * - * @param string $shippingTypeId - * - * @return string[] - */ - public function getPermittedUserGroupIds($shippingTypeId); - - /** - * Returns a list of user ids that may use the shipping type. An empty array means no restriction. - * - * @param string $shippingTypeId - * - * @return string[] - */ - public function getPermittedUserIds($shippingTypeId); - - /** - * Returns a list of active shipping types that may use the shipping type. - * - * @param string $shippingGroupId - * @param string $shippingCountryId - * @param TShopBasket $basket - * - * @return array - */ - public function getAvailableShippingTypes($shippingGroupId, $shippingCountryId, TShopBasket $basket); -}" -,* access the stock message configuration.,"public function getStockMessage($id, $languageId); - - /** - * Return all stock messages. - * - * @return array - */ - public function getAll(); -}" -TPkgShopMapper_ShopAddress,* @var PortalDomainServiceInterface,"public function __construct(PortalDomainServiceInterface $portalDomainService = null, ShopServiceInterface $shopService = null, PageServiceInterface $pageService = null) - { - $this->portalDomainService = $portalDomainService ?? ServiceLocator::get('chameleon_system_core.portal_domain_service'); - $this->shopService = $shopService ?? ServiceLocator::get('chameleon_system_shop.shop_service'); - $this->pageService = $pageService ?? ServiceLocator::get('chameleon_system_core.page_service'); - }" -TPkgShopMapper_ShopAddress,* @var ShopServiceInterface,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oShop', 'TdbShop', $this->shopService->getActiveShop()); - $oRequirements->NeedsSourceObject('oPortal', 'TdbCmsPortal', $this->portalDomainService->getActivePortal()); - }" -TPkgShopMapper_ShopAddress,* @var PageServiceInterface,"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oShop TdbShop */ - $oShop = $oVisitor->GetSourceObject('oShop'); - if (null === $oShop) { - return; - }" -TPkgShopMapper_ShopCentralHandler,* @var ShopServiceInterface,"public function __construct(ShopServiceInterface $shopService = null) - { - if (null === $shopService) { - $this->shopService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_shop.shop_service'); - }" -TPkgShopMapper_ShopCentralHandler,* @param ShopServiceInterface|null $shopService,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oShop', 'TdbShop', $this->shopService->getActiveShop()); - }" -TPkgShopMapper_ShopCentralHandler,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oShop TdbShop */ - $oShop = $oVisitor->GetSourceObject('oShop'); - if ($oShop) { - if ($bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oShop->table, $oShop->id); - }" -TPkgShopMapper_SystemPageLinks,* @var ShopServiceInterface,"public function __construct(ShopServiceInterface $shopService = null) - { - if (null === $shopService) { - $this->shopService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_shop.shop_service'); - }" -TPkgShopMapper_SystemPageLinks,* @param ShopServiceInterface|null $shopService,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oShop', 'TdbShop', $this->shopService->getActiveShop()); - }" -TPkgShopMapper_SystemPageLinks,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oShop TdbShop */ - $oShop = $oVisitor->GetSourceObject('oShop'); - if ($oShop && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oShop->table, $oShop->id); - }" -AbstractPkgShopMapper_Article,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); - $oRequirements->NeedsSourceObject('oShop', 'TdbShop', TdbShop::GetInstance()); - }" -TPkgShopMapper_ArticleAddedToBasket,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - - $oRequirements->NeedsSourceObject('iAmount'); - }" -TPkgShopMapper_ArticleAddedToBasket,@var $oArticle TdbShopArticle,"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oLocal = TCMSLocal::GetActive(); - - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleAttributes,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleBundleContent,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive()); - }" -TPkgShopMapper_ArticleBundleContent,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleGetOneVariantType,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $aReturnData = array(); - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleImageGallery,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('sActiveImageId', 'string', null, true); - }" -TPkgShopMapper_ArticleImageGallery,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oShop TdbShop */ - $oShop = $oVisitor->GetSourceObject('oShop'); - $oCacheTriggerManager->addTrigger($oShop->table, $oShop->id); - - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - - $sActiveImageId = $oVisitor->GetSourceObject('sActiveImageId'); - - $aActiveItem = array(); - $aImages = array(); - $oImages = $oArticle->GetFieldShopArticleImageList(); - if ($oImages->Length() > 0) { - while ($oImage = $oImages->Next()) { - $oCacheTriggerManager->addTrigger($oImage->table, $oImage->id); - $aImage = $this->getImageDetails($oArticle, $oImage, $oCacheTriggerManager); - if (0 === count($aActiveItem) && ($sActiveImageId == $oImage->id || null === $sActiveImageId)) { - $aActiveItem = $aImage; - }" -TPkgShopMapper_ArticleManufacturer,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleMarker,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleOtherCategoriesTeaser,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleQuickShopLink,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleRatingAverage,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleRatingOverview,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleRatingOverview,@var $oArticle TdbShopArticle,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('oReviewModuleConfiguration', 'TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration'); - }" -TPkgShopMapper_ArticleRatingReview,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticleReview TdbShopArticleReview */ - $oArticleReview = $oVisitor->GetSourceObject('oArticleReview'); - if ($oArticleReview && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticleReview->table, $oArticleReview->id); - }" -TPkgShopMapper_ArticleRatingReview,@var $oArticleReview TdbShopArticleReview,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('oArticleReview', 'TdbShopArticleReview'); - $oRequirements->NeedsSourceObject('oReviewModuleConfiguration', 'TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration'); - $oRequirements->NeedsSourceObject('oLocal', 'TdbCmsLocals', TdbCmsLocals::GetActive()); - }" -TPkgShopMapper_ArticleShippingTime,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleTags,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleTeaserBase,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive()); - }" -TPkgShopMapper_ArticleTeaserBase,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -ShopBasketMapper_Url,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $requirements) - { - $requirements->NeedsSourceObject('useRedirect', 'boolean', true, true); - $requirements->NeedsSourceObject('removeModuleMethodCalls', 'boolean', true, true); - }" -ShopBasketMapper_Url,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $visitor, - $cachingEnabled, - IMapperCacheTriggerRestricted $cacheTriggerManager - ) { - $useRedirect = $visitor->GetSourceObject('useRedirect'); - /** @var ShopServiceInterface $shopService */ - $shopService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_shop.shop_service'); - $url = $shopService->getBasketLink($useRedirect); - - $removeModuleMethodCalls = $visitor->GetSourceObject('removeModuleMethodCalls'); - if ($removeModuleMethodCalls) { - $url = $this->removeModuleMethodCalls($url); - }" -TPkgShopBasketMapper_BasketItemsEndPoint,"* always use TPkgShopBasketMapper_BasketItems instead of TPkgShopBasketMapper_BasketItemsEndPoint. -/*","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oBasket', 'TShopBasket', TShopBasket::GetInstance()); - $oRequirements->NeedsSourceObject('oCurrency', 'TdbPkgShopCurrency', TdbPkgShopCurrency::GetActiveInstance()); - $oRequirements->NeedsSourceObject('generateAbsoluteProductUrls', 'bool', false, true); - }" -TPkgShopBasketMapper_BasketItemsEndPoint,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oBasket TShopBasket */ - $oBasket = $oVisitor->GetSourceObject('oBasket'); - - /** @var $oCurrency TdbPkgShopCurrency */ - $oCurrency = $oVisitor->GetSourceObject('oCurrency'); - - $generateAbsoluteProductUrls = $oVisitor->GetSourceObject('generateAbsoluteProductUrls'); - - $aBasketItems = array(); - $oBasketContents = $oBasket->GetBasketContents(); - $oBasketContents->GoToStart(); - /** @var $oItem TShopBasketArticle */ - while ($oItem = $oBasketContents->Next()) { - $aBasketItem = array( - 'sId' => $oItem->id, - 'sBasketItemKey' => $oItem->sBasketItemKey, - 'sImageId' => $oItem->GetImagePreviewObject('basket')->GetImageObject()->id, - 'iAmount' => $oItem->dAmount, - 'sManufacturer' => '', - 'sArticleName' => $oItem->GetName(), - 'sPrice' => TCMSLocal::GetActive()->FormatNumber($oItem->dPrice, 2), - 'sCurrency' => $oCurrency->fieldSymbol, - 'sArticleDetailURL' => $oItem->getLink($generateAbsoluteProductUrls), - 'sNoticeListLink' => $oItem->GetToNoticeListLink(), - 'sRemoveFromBasketLink' => $oItem->GetRemoveFromBasketLink(), - 'bAllowChangeAmount' => true, - 'sPriceTotal' => TCMSLocal::GetActive()->FormatNumber($oItem->dPriceTotal, 2), - ); - if ($oItem instanceof IPkgShopBasketArticleWithCustomData && true === $oItem->isConfigurableArticle()) { - $aBasketItem['customData'] = $oItem->getCustomDataForTwigOutput(); - $aBasketItem['customDataTwigTemplate'] = $oItem->getCustomDataTwigTemplate(); - }" -WITHOUT,"* collects all sum-values for the basket (tax, vouchers, discounts, shipping, etc) - * note: always use the class WITHOUT the EndPoint (ie. use TPkgShopBasketMapper_BasketSummary). -/*","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oBasket', 'TShopBasket', TShopBasket::GetInstance()); - }" -WITHOUT,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oBasket TShopBasket */ - $oBasket = $oVisitor->GetSourceObject('oBasket'); - - $aData = array( - 'dSumProducts' => $oBasket->dCostArticlesTotal, - 'dSumDiscounts' => -1 * $oBasket->dCostDiscounts, - 'aDiscountList' => array(), - 'dSumDiscountVouchers' => -1 * $oBasket->dCostNoneSponsoredVouchers, - 'aDiscountVoucherList' => array(), - 'dSumProductsAfterDiscountsAndDiscountVouchers' => $oBasket->dCostArticlesTotalAfterDiscounts, // after discounts and sponsored vouchers - - 'dSumShipping' => $oBasket->dCostShipping, - 'dSumPaymentSurcharge' => $oBasket->dCostPaymentMethodSurcharge, - - 'dSumVat' => $oBasket->dCostVAT, - 'aVatList' => array(), - 'dSumVatWithoutShipping' => $oBasket->dCostVATWithoutShipping, - - 'dSumSponsoredVouchers' => -1 * $oBasket->dCostVouchers, - 'aSponsoredVoucherList' => array(), - 'dSumGrandTotal' => $oBasket->dCostTotal, - 'dBasketTotalWithoutSponsoredVouchers' => $oBasket->dCostTotal + $oBasket->dCostVouchers, - - 'iNumberOfUniqueProducts' => $oBasket->iTotalNumberOfUniqueArticles, - 'iNumberOfProducts' => $oBasket->dTotalNumberOfArticles, - 'shippingCountryKnown' => false, - 'oDefaultCountry' => $this->getShop()->GetFieldDataCountry(), - ); - - $user = $this->getActiveUser(); - $shippingAddress = $user->GetShippingAddress(); - if (null !== $shippingAddress->GetFieldDataCountry()) { - $aData['shippingCountryKnown'] = true; - }" -TPkgShopBasketMapper_ToMiniBasket,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oBasket', 'TShopBasket', TShopBasket::GetInstance()); - $oRequirements->NeedsSourceObject('oShop', 'TdbShop', TdbShop::GetInstance()); - }" -TPkgShopBasketMapper_ToMiniBasket,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oShop TdbShop */ - $oShop = $oVisitor->GetSourceObject('oShop'); - if ($oShop && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oShop->table, $oShop->id); - }" -TPkgShopBasketMapper_VoucherInput,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oMessageManager', 'TCMSMessageManager', TCMSMessageManager::GetInstance()); - $oRequirements->NeedsSourceObject('oActivePage', 'TCMSActivePage', $this->getActivePageService()->getActivePage(), true); - }" -TPkgShopBasketMapper_VoucherInput,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $sMessageConsumerParameterName = MTShopBasketCore::URL_REQUEST_PARAMETER.'['.MTShopBasket::URL_MESSAGE_CONSUMER_NAME.']'; - - $sFormInputName = MTShopBasket::URL_REQUEST_PARAMETER.'['.MTShopBasket::URL_VOUCHER_CODE.']'; - $oMessageManager = $oVisitor->GetSourceObject('oMessageManager'); - /** @var $oMessageManager TCMSMessageManager* */ - if ($oMessageManager->ConsumerHasMessages('sAddVoucherField')) { - $oVisitor->SetMappedValue('sErrorMessage', $oMessageManager->RenderMessages('sAddVoucherField')); - }" -TPkgShopMapper_ArticleAddToBasket,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); - $oRequirements->NeedsSourceObject('bRedirectToBasket', 'bool', false); - }" -TPkgShopMapper_ArticleAddToBasket,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleAddToBasketAjax,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); - $oRequirements->NeedsSourceObject('bRedirectToBasket', 'bool', false); - }" -TPkgShopMapper_ArticleAddToBasketAjax,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if (!is_null($oArticle) && !is_null($oArticle->id)) { - $oVisitor->SetMappedValue('sBasketFormId', 'tobasket'.$oArticle->sqlData['cmsident']); - $sAjaxBasketLink = ""CHAMELEON.Custom.AddToBasket('"".TdbShop::GetInstance()->GetBasketModuleSpotName().""', '"".TGlobal::OutHTML($oArticle->id).""', document.tobasket{$oArticle->sqlData['cmsident']}" -TPkgShopMapper_ArticleTransferToBasket,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); - $oRequirements->NeedsSourceObject('bRedirectToBasket', 'bool', false); - $oRequirements->NeedsSourceObject('oShop', 'TdbShop', TdbShop::GetInstance()); - }" -TPkgShopMapper_ArticleTransferToBasket,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TCMSPageBreadcrumbMapper,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oBreadCrumb', 'TCMSPageBreadcrumb'); - }" -TCMSPageBreadcrumbMapper,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oBreadCrumb TCMSPageBreadcrumb */ - $oBreadCrumb = $oVisitor->GetSourceObject('oBreadCrumb'); - $aTree = array(); - $oBreadCrumb->GoToStart(); - while ($oNode = $oBreadCrumb->Next()) { /*@var $oNode TCMSTreeNode */ - $aTree[] = array('bIsActive' => false, - 'bIsExpanded' => true, - 'sLink' => $oNode->GetLink(), - 'sTitle' => $oNode->GetName(), ); - }" -AbstractPkgShopMapper_Category,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopCategory'); - }" -TPkgShopMapper_CategoryDescription,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oCategory TdbShopCategory */ - $oCategory = $oVisitor->GetSourceObject('oObject'); - if ($oCategory && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oCategory->table, $oCategory->id); - }" -TPkgShopMapper_CategorySeoText,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oCategory TdbShopCategory */ - $oCategory = $oVisitor->GetSourceObject('oObject'); - if ($oCategory && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oCategory->table, $oCategory->id); - }" -TPkgShopMapper_CategorySubCategories,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oCategory TdbShopCategory */ - $oCategory = $oVisitor->GetSourceObject('oObject'); - if ($oCategory && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oCategory->table, $oCategory->id); - }" -TPkgShopMapper_CategoryTeaserBase,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oCategory TdbShopCategory */ - $oCategory = $oVisitor->GetSourceObject('oObject'); - if ($oCategory && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oCategory->table, $oCategory->id); - }" -TPkgShopMapper_ArticleListHeader,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('sListOptionSort', 'string'); - }" -TPkgShopMapper_ArticleListHeader,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oVisitor->SetMappedValue('sListOptionSort', $oVisitor->GetSourceObject('sListOptionSort')); - }" -TPkgShopMapper_ArticleListOrderBy,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oOrderByList', 'TdbShopModuleArticlelistOrderbyList'); - $oRequirements->NeedsSourceObject('sActiveOrderById', 'string', null); - $oRequirements->NeedsSourceObject('sOrderByTitle', 'string'); - $oRequirements->NeedsSourceObject('sFieldName', 'string'); - }" -TPkgShopMapper_ArticleListOrderBy,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oOrderByList TdbShopModuleArticlelistOrderbyList */ - $oOrderByList = $oVisitor->GetSourceObject('oOrderByList'); - - if (!is_object($oOrderByList) || 0 == $oOrderByList->Length()) { - return; - }" -TPkgShopMapper_ArticleListPager,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oList', 'TdbShopArticleList'); - $oRequirements->NeedsSourceObject('listIdent', 'string'); - }" -TPkgShopMapper_ArticleListPager,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticleList TdbShopArticleList */ - $oArticleList = $oVisitor->GetSourceObject('oList'); - - $aListPaging = array( - 'iActivePage' => $oArticleList->GetCurrentPageNumber(), - 'iLastPage' => $oArticleList->GetTotalPageCount(), - 'sURL' => str_replace(TdbShopArticleList::URL_LIST_CURRENT_PAGE.'=0', TdbShopArticleList::URL_LIST_CURRENT_PAGE.'={[pageNumber0]}" -TPkgShopMapper_ArticleListResultInfo,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oList', 'TdbShopArticleList'); - $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive()); - }" -TPkgShopMapper_ArticleListResultInfo,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticleList TdbShopArticleList */ - $oArticleList = $oVisitor->GetSourceObject('oList'); - - /** @var $oLocal TCMSLocal */ - $oLocal = $oVisitor->GetSourceObject('oLocal'); - - $iStartItem = $oArticleList->GetStartRecordNumber() + 1; - $iMaxItems = $oArticleList->Length(); - $iEndItem = $oArticleList->GetStartRecordNumber() + $oArticleList->GetPageSize(); - if ($iEndItem > $iMaxItems) { - $iEndItem = $iMaxItems; - }" -AbstractPkgShopMapper_Manufacturer,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopManufacturer'); - }" -TPkgShopManufacturerMapper_Intro,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oManufacturer TdbShopManufacturer */ - $oManufacturer = $oVisitor->GetSourceObject('oObject'); - if ($oManufacturer && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oManufacturer->table, $oManufacturer->id); - }" -TPkgShopManufacturerMapper_Overview,* @var TranslatorInterface,"public function __construct(TranslatorInterface $translator = null) - { - if (null === $translator) { - $this->translator = \ChameleonSystem\CoreBundle\ServiceLocator::get('translator'); - }" -TPkgShopManufacturerMapper_Overview,* @param TranslatorInterface|null $translator,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oConfig', 'TdbShopManufacturerModuleConf'); - $oRequirements->NeedsSourceObject('oManufacturerList', 'TdbShopManufacturerList'); - }" -TPkgShopManufacturerMapper_Overview,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oConfig TdbShopManufacturerModuleConf */ - $oConfig = $oVisitor->GetSourceObject('oConfig'); - if ($oConfig && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oConfig->table, $oConfig->id); - }" -TPkgShopManufacturerMapper_OverviewNavigation,* @var UrlNormalizationUtil,"public function __construct(UrlNormalizationUtil $urlNormalizationUtil = null) - { - if (null === $urlNormalizationUtil) { - $this->urlNormalizationUtil = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.util.url_normalization'); - }" -TPkgShopManufacturerMapper_OverviewNavigation,* @param UrlNormalizationUtil|null $urlNormalizationUtil,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oManufacturerList', 'TdbShopManufacturerList'); - }" -TPkgShopManufacturerMapper_OverviewNavigation,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oManufacturerList TdbShopManufacturerList */ - $oManufacturerList = $oVisitor->GetSourceObject('oManufacturerList'); - if ($bCachingEnabled) { - $oCacheTriggerManager->addTrigger('shop_manufacturer', null); - }" -MTMyAccountMapper_Newsletter,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oNewsletterUser', 'TdbPkgNewsletterUser', null, true); - $oRequirements->NeedsSourceObject('oMyAccountModuleConfig', 'TdbDataExtranetModuleMyAccount'); - $oRequirements->NeedsSourceObject('sActionLink', ''); - }" -MTMyAccountMapper_Newsletter,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oNewsletterUser TdbPkgNewsletterUser */ - $oNewsletterUser = $oVisitor->GetSourceObject('oNewsletterUser'); - $bNewsletterSubscribed = true; - if (is_null($oNewsletterUser) || !$oNewsletterUser->fieldOptin) { - $bNewsletterSubscribed = false; - }" -TPkgShopMapper_ArticleRemoveNoticeList,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); - }" -TPkgShopMapper_ArticleRemoveNoticeList,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_ArticleToNoticeList,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle'); - }" -TPkgShopMapper_ArticleToNoticeList,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oArticle TdbShopArticle */ - $oArticle = $oVisitor->GetSourceObject('oObject'); - if ($oArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oArticle->table, $oArticle->id); - }" -TPkgShopMapper_Order,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true); - }" -TPkgShopMapper_Order,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oOrder TdbShopOrder */ - $oOrder = $oVisitor->GetSourceObject('oObject'); - if (null !== $oOrder) { - if ($bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id); - }" -TPkgShopMapper_OrderArticleList,@var bool,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true); - $oRequirements->NeedsSourceObject('bAbsoluteArticleUrls', null, false); - }" -TPkgShopMapper_OrderArticleList,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oOrder TdbShopOrder */ - $oOrder = $oVisitor->GetSourceObject('oObject'); - $this->bAbsoluteArticleUrls = $oVisitor->GetSourceObject('bAbsoluteArticleUrls'); - if (null !== $oOrder) { - if ($bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id); - }" -TPkgShopMapper_OrderArticleListSummary,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true); - }" -TPkgShopMapper_OrderArticleListSummary,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oOrder TdbShopOrder */ - $oOrder = $oVisitor->GetSourceObject('oObject'); - if (null !== $oOrder) { - if ($bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id); - }" -TPkgShopMapper_OrderPayment,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true); - $oRequirements->NeedsSourceObject('sPaymentHtml', 'string', '', true); - }" -TPkgShopMapper_OrderPayment,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oOrder TdbShopOrder */ - $oOrder = $oVisitor->GetSourceObject('oObject'); - - if (null !== $oOrder) { - if ($bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id); - }" -TPkgShopMapper_OrderUserData,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopOrder', null, true); - }" -TPkgShopMapper_OrderUserData,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oOrder TdbShopOrder */ - $oOrder = $oVisitor->GetSourceObject('oObject'); - - if (null !== $oOrder) { - if ($bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oOrder->table, $oOrder->id); - }" -TPkgShopMapperOrderwizard_AddressSelection,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('selectedAddressId', 'string', null, true); - }" -TPkgShopMapperOrderwizard_AddressSelection,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); - /** @var $oAddressObject TdbDataExtranetUserAddress */ - $oAddressObject = $oVisitor->GetSourceObject('oAddressObject'); - $selectedAddressId = $oVisitor->GetSourceObject('selectedAddressId'); - - $oVisitor->SetMappedValue('bActive', $oAddressObject->id == $selectedAddressId); - $oVisitor->SetMappedValue('sAddressId', $oAddressObject->id); - }" -TPkgShopMapper_OrderCompleted,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oThankYouOrderStep', 'TdbShopOrderStep'); - $oRequirements->NeedsSourceObject('sPaymentHtml'); - $oRequirements->NeedsSourceObject('oOrder', 'TdbShopOrder'); - }" -TPkgShopMapper_OrderCompleted,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oActiveOrderStep TdbShopOrderStep */ - $oActiveOrderStep = $oVisitor->GetSourceObject('oThankYouOrderStep'); - if ($oActiveOrderStep && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oActiveOrderStep->table, $oActiveOrderStep->id); - }" -TPkgShopMapper_OrderStep,* @var InputFilterUtilInterface,"public function __construct(InputFilterUtilInterface $inputFilterUtil = null) - { - if (null === $inputFilterUtil) { - $this->inputFilterUtil = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.util.input_filter'); - }" -TPkgShopMapper_OrderStep,* @param InputFilterUtilInterface|null $inputFilterUtil,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('sBackLink'); - $oRequirements->NeedsSourceObject('shop', 'TdbShop', TShop::GetInstance()); - }" -TPkgShopMapper_OrderStep,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $shop TdbShop */ - $shop = $oVisitor->GetSourceObject('shop'); - $oVisitor->SetMappedValueFromArray($shop->GetSQLWithTablePrefix()); - $oVisitor->SetMappedValue('sSupportMail', $shop->fieldCustomerServiceEmail); - $sBackLink = $oVisitor->GetSourceObject('sBackLink'); - $sBackLink = $this->inputFilterUtil->filterValue($sBackLink, TCMSUserInput::FILTER_URL_INTERNAL); - $oVisitor->SetMappedValue('sBackLink', $sBackLink); - }" -TPkgShopMapper_PaymentList,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oPaymentMethodList', 'TdbShopPaymentMethodList', null, true); - $oRequirements->NeedsSourceObject('oActivePaymentMethod', 'TdbShopPaymentMethod', null, true); - $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive()); - }" -TPkgShopMapper_PaymentList,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oPaymentMethodList TdbShopPaymentMethodList */ - $oPaymentMethodList = $oVisitor->GetSourceObject('oPaymentMethodList'); - /** @var $oActivePaymentMethod TdbShopPaymentMethod */ - $oActivePaymentMethod = $oVisitor->GetSourceObject('oActivePaymentMethod'); - if ($oActivePaymentMethod && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oActivePaymentMethod->table, $oActivePaymentMethod->id); - }" -TPkgShopMapper_ShippingGroupList,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oShippingGroupList', 'TdbShopShippingGroupList'); - $oRequirements->NeedsSourceObject('oActiveShippingGroup', 'TdbShopShippingGroup', null, true); - $oRequirements->NeedsSourceObject('oLocal', 'TCMSLocal', TCMSLocal::GetActive()); - }" -TPkgShopMapper_ShippingGroupList,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oShippingGroupList TdbShopShippingGroupList */ - $oShippingGroupList = $oVisitor->GetSourceObject('oShippingGroupList'); - /** @var $oActiveShippingGroup TdbShopShippingGroup */ - $oActiveShippingGroup = $oVisitor->GetSourceObject('oActiveShippingGroup'); - /** @var $oLocal TCMSLocal */ - $oLocal = $oVisitor->GetSourceObject('oLocal'); - - $aFormControlParameter = array( - 'module_fnc' => array('[{sModuleSpotName}" -TPkgShopMapper_SocialSharePrivacy,* @deprecated since 6.2.11 - not used anymore,"public function __construct(LanguageServiceInterface $languageService = null) - { - if (null === $languageService) { - $this->languageService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.language_service'); - }" -TPkgShopMapper_SocialSharePrivacy,* @var LanguageServiceInterface,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject( - 'activeLanguage', - 'TdbCmsLanguage', - $this->languageService->getActiveLanguage() - ); - }" -TPkgShopMapper_SocialSharePrivacy,* @param LanguageServiceInterface|null $languageService,"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - $language = 'en'; - /** @var TdbCmsLanguage $activeLanguage */ - $activeLanguage = $oVisitor->GetSourceObject('activeLanguage'); - if (null !== $activeLanguage && 'de' === $activeLanguage->fieldIso6391) { - $language = 'de'; - }" -AbstractPkgShopPaymentHandlerMapper,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oPaymentHandler', 'TdbShopPaymentHandler'); - $oRequirements->NeedsSourceObject('sPaymentMethodId', 'string'); // the payment method using the payment handler - }" -AbstractPkgShopPaymentHandlerMapper_iPayment,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oPaymentHandler TShopPaymentHandlerIPaymentCreditCard */ - $oPaymentHandler = $oVisitor->GetSourceObject('oPaymentHandler'); - if ($oPaymentHandler && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oPaymentHandler->table, $oPaymentHandler->id); - }" -TPkgShopPaymentHandlerMapper_IPaymentCreditCard,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); - - /** @var $oPaymentHandler TShopPaymentHandlerIPaymentCreditCard */ - $oPaymentHandler = $oVisitor->GetSourceObject('oPaymentHandler'); - $cards = $oPaymentHandler->GetConfigParameter('cards'); - - //{'sValue':'AmexCard','sName':'AmericanExpress'}" -TPkgShopPaymentHandlerMapper_PayPalExpressBasket,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('sSpotName'); - }" -TPkgShopPaymentHandlerMapper_PayPalExpressBasket,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oPaymentMethod = TdbShopPaymentMethod::GetNewInstance(); - if ($oPaymentMethod->LoadFromFields(array('name_internal' => 'paypal-express', 'active' => '1'))) { - if (false === \TdbShopShippingGroupList::GetShippingGroupsThatAllowPaymentWith('paypal-express')) { - $oVisitor->SetMappedValue('sPayPalExpressLink', false); - - return; - }" -TPkgShopPaymentHandlerMapper_PayPalViaLinkOrderCompleted,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('oOrder', 'TdbShopOrder'); - $oRequirements->NeedsSourceObject('oTextBlock'); - }" -TPkgShopPaymentHandlerMapper_PayPalViaLinkOrderCompleted,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oOrder TdbShopOrder */ - $oOrder = $oVisitor->GetSourceObject('oOrder'); - /** @var $oPaymentHandler TdbShopPaymentHandler */ - $oPaymentHandler = $oVisitor->GetSourceObject('oPaymentHandler'); - /** @var $oTextBlock TdbPkgCmsTextBlock */ - $oTextBlock = $oVisitor->GetSourceObject('oTextBlock'); - if ($oTextBlock && $oTextBlock instanceof TdbPkgCmsTextBlock) { - $sPaymentText = $oTextBlock->GetTextField('content'); - $oVisitor->SetMappedValue('sPaymentText', $sPaymentText); - }" -AbstractTCMSWizardStepMapper,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TCMSWizardStep'); - }" -TCMSWizardStepListMapper_Basket,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oStepList', 'TdbShopOrderStepList'); - $oRequirements->NeedsSourceObject('oActiveStep', 'TdbShopOrderStep'); - }" -TCMSWizardStepListMapper_Basket,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oActiveStep TdbShopOrderStep */ - $oActiveStep = $oVisitor->GetSourceObject('oActiveStep'); - if ($oActiveStep && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oActiveStep->table, $oActiveStep->id); - }" -TCMSWizardStepMapper_UserAddressForm,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oExtranetConfig = TdbDataExtranet::GetInstance(); - if ($oExtranetConfig && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oExtranetConfig->table, $oExtranetConfig->id); - }" -TCMSWizardStepMapper_UserAddressType,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('bIsBillingAddress', 'boolean'); - }" -TCMSWizardStepMapper_UserAddressType,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $bIsBillingAddress = $oVisitor->GetSourceObject('bIsBillingAddress'); - $oVisitor->SetMappedValue('bIsBillingAddress', $bIsBillingAddress); - }" -TCMSWizardStepMapper_UserProfile,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $aUserData = $oVisitor->GetSourceObject('aUserInput'); - $sSpotName = $oVisitor->GetSourceObject('sSpotName'); - $aFieldMessages = $oVisitor->GetSourceObject('aFieldMessages'); - $sWizardSpotName = $oVisitor->GetSourceObject('sWizardModuleModuleSpot'); - /** @var $oWizardStep TCMSWizardStep */ - $oWizardStep = $oVisitor->GetSourceObject('oObject'); - - $aFieldBirthdate = array(); - $aFieldBirthdate['sError'] = $this->GetMessageForField('birthdate', $aFieldMessages); - $aFieldBirthdate['sValue'] = $this->GetValueForField('birthdate', $aUserData); - $oVisitor->SetMappedValue('aFieldBirthdate', $aFieldBirthdate); - - $aTextData = array(); - $aTextData['sTitle'] = $oWizardStep->fieldName; - $aTextData['sText'] = $oWizardStep->GetTextField('description'); - - $sUrl = $oWizardStep->GetStepURL(); - - $oVisitor->SetMappedValue('sSpotName', $sSpotName); - $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); - $oVisitor->SetMappedValue('aTextData', $aTextData); - $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); - $oVisitor->SetMappedValue('sStepURL', $sUrl); - }" -TCMSWizardStepMapper_UserProfile,@var $oWizardStep TCMSWizardStep,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('sSpotName'); - $oRequirements->NeedsSourceObject('sWizardModuleModuleSpot'); - $oRequirements->NeedsSourceObject('aUserInput'); - $oRequirements->NeedsSourceObject('aFieldMessages'); - }" -TCMSWizardStepMapper_UserProfileEmail,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $sSpotName = $oVisitor->GetSourceObject('sSpotName'); - $sWizardSpotName = $oVisitor->GetSourceObject('sWizardModuleModuleSpot'); - $sCustomMSGConsumer = $oVisitor->GetSourceObject('sCustomMSGConsumer'); - /** @var $oWizardStep TCMSWizardStep */ - $oWizardStep = $oVisitor->GetSourceObject('oObject'); - - $aFieldList = array('aFieldEmail' => 'name', 'aFieldPassword' => 'sRequirePassword'); - $this->SetInputFields($aFieldList, $oVisitor, $sCustomMSGConsumer); - - $aTextData = array(); - $aTextData['sTitle'] = $oWizardStep->fieldName; - $aTextData['sText'] = $oWizardStep->GetTextField('description'); - - $sUrl = $oWizardStep->GetStepURL(); - - $oVisitor->SetMappedValue('sSpotName', $sSpotName); - $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); - $oVisitor->SetMappedValue('aTextData', $aTextData); - $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); - $oVisitor->SetMappedValue('sStepURL', $sUrl); - $oVisitor->SetMappedValue('sCustomMSGConsumer', $sCustomMSGConsumer); - $oVisitor->SetMappedValue('sSuccessMessage', $this->GetMessageForField('sChangeEmailSuccess', $sCustomMSGConsumer)); - }" -TCMSWizardStepMapper_UserProfileEmail,@var $oWizardStep TCMSWizardStep,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('sSpotName'); - $oRequirements->NeedsSourceObject('sWizardModuleModuleSpot'); - $oRequirements->NeedsSourceObject('sCustomMSGConsumer'); - }" -TCMSWizardStepMapper_UserProfilePassword,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $sSpotName = $oVisitor->GetSourceObject('sSpotName'); - $sWizardSpotName = $oVisitor->GetSourceObject('sWizardModuleModuleSpot'); - $sCustomMSGConsumer = $oVisitor->GetSourceObject('sCustomMSGConsumer'); - /** @var $oWizardStep TCMSWizardStep */ - $oWizardStep = $oVisitor->GetSourceObject('oObject'); - $aFieldList = array('aFieldOldPassword' => 'sRequirePassword', 'aFieldNewPassword' => 'password', 'aFieldNewPasswordCheck' => 'password2'); - $this->SetInputFields($aFieldList, $oVisitor, $sCustomMSGConsumer); - - $aTextData = array(); - $aTextData['sTitle'] = $oWizardStep->fieldName; - $aTextData['sText'] = $oWizardStep->GetTextField('description'); - - $sUrl = $oWizardStep->GetStepURL(); - - $oVisitor->SetMappedValue('sSpotName', $sSpotName); - $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); - $oVisitor->SetMappedValue('aTextData', $aTextData); - $oVisitor->SetMappedValue('sWizardSpotName', $sWizardSpotName); - $oVisitor->SetMappedValue('sStepURL', $sUrl); - $oVisitor->SetMappedValue('sCustomMSGConsumer', $sCustomMSGConsumer); - $oVisitor->SetMappedValue('sSuccessMessage', $this->GetMessageForField('sChangePasswordSuccess', $sCustomMSGConsumer)); - }" -TCMSWizardStepMapper_UserProfilePassword,@var $oWizardStep TCMSWizardStep,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('sSpotName'); - $oRequirements->NeedsSourceObject('sWizardModuleModuleSpot'); - $oRequirements->NeedsSourceObject('sCustomMSGConsumer'); - }" -FilterFactory,"* This works because `ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Filter` extends - * `ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\FilterDefinition`. - * - * @psalm-suppress InvalidReturnType, InvalidReturnStatement - * - * @param FilterDefinitionInterface $filterDefinition - * - * @return FilterInterface","public function createFilter(FilterDefinitionInterface $filterDefinition) - { - return $filterDefinition; // currently the filter is an extension of the filter definition - that is nonsense but can not be changed without breaking oodles of old code. - }" -FilterFactory,"* @param FilterInterface $filter - * - * @return FilterInterface|null","public function createFallbackFilter(FilterInterface $filter) - { - if (true === $filter->PreventUseOfParentObjectWhenNoRecordsAreFound()) { - return null; - }" -Module,* @var StateFactoryInterface,"public function __construct( - array $viewToListViewMapping, - RequestStack $requestStack, - StateFactoryInterface $stateFactory, - DbAdapterInterface $dbAdapter, - ResultFactoryInterface $resultFactory, - StateRequestExtractorCollectionInterface $requestExtractorCollection, - ActivePageServiceInterface $activePageService, - ViewRenderer $viewRenderer, - CacheInterface $cache, - StateElementPageSize $stateElementPageSize, - array $validPageSizes, - UrlUtil $urlUtil, - MapperLoaderInterface $mapperLoader - ) { - parent::__construct(); - $this->requestStack = $requestStack; - $this->stateFactory = $stateFactory; - $this->dbAdapter = $dbAdapter; - $this->resultFactory = $resultFactory; - - $this->requestExtractorCollection = $requestExtractorCollection; - $this->activePageService = $activePageService; - $this->viewRenderer = $viewRenderer; - $this->cache = $cache; - $this->viewToListViewMapping = $viewToListViewMapping; - $this->stateElementPageSize = $stateElementPageSize; - $this->validPageSizes = $validPageSizes; - $this->urlUtil = $urlUtil; - $this->mapperLoader = $mapperLoader; - }" -Module,* @var RequestStack,"public function Init() - { - parent::Init(); - $this->loadConfiguration(); // need to load config in init because this may affect what get/post parameter are relevant for the state (and thus for caching). - $this->initializeListState(); - $this->resultFactory->moduleInitHook($this->configuration); - $this->initProductListResult(); - }" -Module,* @var State,"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - $enrichedState = $this->enrichStateWithDefaultsFromConfiguration(); - $results = $this->moduleListResult; - if (null === $results) { - $results = $this->getResults($enrichedState); - }" -Module,* @var DbAdapterInterface,"public function _GetCacheParameters() - { - $cacheParameter = parent::_GetCacheParameters(); - $cacheParameter['list_class'] = 'ChameleonSystem\ShopBundle\objects\ArticleList\Module'; - - $resultParameters = $this->resultFactory->_GetCacheParameters($this->configuration, $this->state); - $cacheParameter = array_merge_recursive($cacheParameter, $resultParameters); - - return $cacheParameter; - }" -Module,* @var ConfigurationInterface,"public function _AllowCache() - { - if (true === $this->preventCaching) { - return false; - }" -ResultData,* @var \TdbShopArticle[],"public function count() - { - return $this->totalNumberOfResults; - }" -ResultData,* @var int,"public function setTotalNumberOfResults($totalNumberOfResults) - { - $this->totalNumberOfResults = (int) $totalNumberOfResults; - }" -ResultData,* @var int,"public function getTotalNumberOfResults() - { - return $this->totalNumberOfResults; - }" -ResultData,* @var int,"public function getPage() - { - return $this->page; - }" -ResultData,* @var ResultInterface,"public function setPage($page) - { - $this->page = (int) $page; - - return $this; - }" -ResultData,* @return int,"public function asArray() - { - return $this->items; - }" -ResultData,* @return \TdbShopArticle[],"public function setItems(array $items) - { - $this->items = $items; - - return $this; - }" -ResultData,"* @param \TdbShopArticle[] $items - * - * @return $this","public function getNumberOfPages() - { - if ($this->pageSize < 1) { - return 1; - }" -ResultData,"* @return int - * @psalm-suppress InvalidReturnType, InvalidReturnStatement","public function setPageSize($pageSize) - { - $this->pageSize = (int) $pageSize; - - return $this; - }" -ResultData,* @return void,"public function getPageSize() - { - return $this->pageSize; - }" -ResultData,* @return ResultInterface,"public function setRawResult(ResultInterface $rawResult) - { - $this->rawResult = $rawResult; - }" -ResultFactory,* @var DatabaseAccessLayer\Interfaces\DbAdapterInterface,"public function __construct(DbAdapterInterface $dbAdapter, FilterFactoryInterface $filterFactory, ResultModifierInterface $resultModifier, EventDispatcherInterface $eventDispatcher) - { - $this->dbAdapter = $dbAdapter; - $this->filterFactory = $filterFactory; - $this->resultModifier = $resultModifier; - $this->eventDispatcher = $eventDispatcher; - }" -ResultFactory,* @var Interfaces\FilterFactoryInterface,"public function createResult(ConfigurationInterface $moduleConfiguration, StateInterface $state) - { - $results = $this->createUnfilteredResults($moduleConfiguration); - - $results = $this->applyMaxAllowedResults($results, $moduleConfiguration); - - $results = $this->applyStateToResults($results, $moduleConfiguration->getAsArray(), $state); - - $resultData = $this->createResultDataFromResults($results); - - $this->triggerFilterExecutedEvent($resultData, $moduleConfiguration, $state); - - return $resultData; - }" -ResultFactory,* @var ResultModifier\Interfaces\ResultModifierInterface,"public function _AllowCache(ConfigurationInterface $moduleConfiguration) - { - return $this->getFilter($moduleConfiguration)->_AllowCache(); - }" -ResultFactory,* @var DatabaseAccessLayer\Interfaces\FilterInterface[],"public function _GetCacheParameters(ConfigurationInterface $moduleConfiguration, StateInterface $state) - { - $cacheParameter = $this->getFilter($moduleConfiguration)->_GetCacheParameters(); - $cacheParameter['state'] = $state->getStateArray(); - $cacheParameter['configuration_id'] = $moduleConfiguration->getId(); - - return $cacheParameter; - }" -ResultFactory,* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface,"public function _GetCacheTableInfos(ConfigurationInterface $moduleConfiguration) - { - $filter = $this->getFilter($moduleConfiguration)->_GetCacheTableInfos(); - $result = array( - array('table' => 'shop_module_article_list', 'id' => $moduleConfiguration->getId()), - array('table' => 'shop_article', 'id' => null), - array('table' => 'shop', 'id' => null), - array('table' => 'shop_category', 'id' => null), - array('table' => 'shop_manufacturer', 'id' => null), - ); - - return array_merge($filter, $result); - }" -ResultFactory,"* @param ConfigurationInterface $moduleConfiguration - * - * @return ResultInterface","public function getFilterQuery(ConfigurationInterface $moduleConfiguration) - { - return $this->getFilter($moduleConfiguration)->getFilterQuery($moduleConfiguration); - }" -ResultFactory,"* @param ResultInterface $results - * @param array $moduleConfig - * @param StateInterface $state - * @return ResultInterface","public function moduleInitHook(ConfigurationInterface $moduleConfiguration) - { - $this->getFilter($moduleConfiguration)->ModuleInitHook(); - }" -ResultFactoryCache,* @var Interfaces\ResultFactoryInterface,"public function __construct( - ResultFactoryInterface $resultFactory, - CacheInterface $cache, - FilterFactoryInterface $filterFactory, - EventDispatcherInterface $eventDispatcher, - DbAdapterInterface $dbAdapter - ) { - $this->resultFactory = $resultFactory; - $this->cache = $cache; - $this->filterFactory = $filterFactory; - $this->eventDispatcher = $eventDispatcher; - $this->dbAdapter = $dbAdapter; - }" -ResultFactoryCache,* @var \esono\pkgCmsCache\CacheInterface,"public function createResult(ConfigurationInterface $moduleConfiguration, StateInterface $state) - { - if (false === $this->_AllowCache($moduleConfiguration)) { - return $this->resultFactory->createResult($moduleConfiguration, $state); - }" -ResultFactoryCache,* @var FilterFactoryInterface,"public function _AllowCache(ConfigurationInterface $moduleConfiguration) - { - return $this->resultFactory->_AllowCache($moduleConfiguration); - }" -ResultFactoryCache,* @var EventDispatcherInterface,"public function _GetCacheParameters(ConfigurationInterface $moduleConfiguration, StateInterface $state) - { - return $this->resultFactory->_GetCacheParameters($moduleConfiguration, $state); - }" -ResultFactoryCache,* @var DbAdapterInterface,"public function _GetCacheTableInfos(ConfigurationInterface $moduleConfiguration) - { - return $this->resultFactory->_GetCacheTableInfos($moduleConfiguration); - }" -ResultFactoryCache,"* @param ResultFactoryInterface $resultFactory - * @param CacheInterface $cache - * @param FilterFactoryInterface $filterFactory - * @param EventDispatcherInterface $eventDispatcher - * @param DbAdapterInterface $dbAdapter","public function getFilterQuery(ConfigurationInterface $moduleConfiguration) - { - return $this->resultFactory->getFilterQuery($moduleConfiguration); - }" -ResultFactoryCache,"* Note: If an invalid page is requested via state, then the first page will be returned instead. - * - * @param ConfigurationInterface $moduleConfiguration - * @param StateInterface $state - * - * @return ResultDataInterface","public function moduleInitHook(ConfigurationInterface $moduleConfiguration) - { - /** - * @psalm-suppress InvalidReturnStatement - * @FIXME Returning `void` result - */ - return $this->resultFactory->moduleInitHook($moduleConfiguration); - }" -SortString,* @var string,"public function __construct($sqlOrderByString) - { - $this->sqlOrderByString = $sqlOrderByString; - }" -SortString,* @param string $sqlOrderByString,"public function getAsArray() - { - $sort = array(); - $parts = explode(',', $this->sqlOrderByString); - foreach ($parts as $part) { - $part = trim($part); - if ('' === $part) { - continue; - }" -State,"* @var array","public function setStateFromString($stateString) - { - $parts = explode(',', $stateString); - foreach ($parts as $statePartial) { - $statePartialParts = explode(':', $statePartial); - if (2 !== count($statePartialParts)) { - continue; - }" -State,"* @var array","public function setState($name, $value) - { - if ('' === $value) { - if (true === isset($this->stateData[$name])) { - unset($this->stateData[$name]); - }" -State,"* @param string $name - * @param mixed $value - * @return void","public function getStateString(array $varyingStateParameter = null) - { - $stateInput = $this->getStateArrayWithoutQueryParameter(); - $parts = array(); - foreach ($stateInput as $key => $value) { - if (null !== $varyingStateParameter && in_array($key, $varyingStateParameter)) { - continue; - }" -State,"* returns a string representation of the state, excluding the parameter specified by varyingStateParameter. - * - * @param array|null $varyingStateParameter - * - * @return string","public function getState($name, $default = null) - { - if (false === isset($this->stateData[$name])) { - return $default; - }" -State,"* @param string $name - * @param mixed $default - * @return mixed","public function getStateArray() - { - return $this->stateData; - }" -State,"* does not include query parameter. - * - * @return array","public function getStateArrayWithoutQueryParameter() - { - $stateData = $this->getStateArray(); - if (isset($stateData[StateInterface::QUERY])) { - unset($stateData[StateInterface::QUERY]); - }" -State,"* @return array","public function getStateAsUrlQueryArray($parameterIdentifier, array $varyingStateParameter = null) - { - $urlQueryData = array(); - - $state = $this->getStateString($varyingStateParameter); - if ('' !== $state) { - $urlQueryData[$parameterIdentifier] = array(StateInterface::STATE_STRING => $state); - }" -State,"* @param string $name - * @param mixed $value - * @return bool","public function getQueryParameter() - { - return $this->getState(StateInterface::QUERY, array()); - }" -State,"* @return array","public function registerStateElement(StateElementInterface $element) - { - $this->stateElement[$element->getKey()] = $element; - }" -State,"* @param string $name - * @return bool","public function setUnsetStatesOnly(array $stateValues) - { - foreach ($stateValues as $key => $value) { - if (null === $this->getState($key, null)) { - $this->setState($key, $value); - }" -StateFactory,* @var StateElementInterface[],"public function registerStateElement(StateElementInterface $stateElement) - { - $this->stateElements[$stateElement->getKey()] = $stateElement; - }" -StateFactory,* {@inheritdoc},"public function createState(array $userData = null) - { - $state = $this->createStateObject(); - - if (null === $userData) { - return $state; - }" -StateFactory,* {@inheritdoc},"public function createStateEnrichedWithDefaults(StateInterface $state, ConfigurationInterface $configuration) - { - $defaultValues = array( - StateInterface::PAGE_SIZE => $configuration->getDefaultPageSize(), - StateInterface::SORT => $configuration->getDefaultSortId(), - ); - $enrichedState = clone $state; - $enrichedState->setUnsetStatesOnly($defaultValues); - - return $enrichedState; - }" -Configuration,"* returns null if there is no page size set. - * - * @return int|null","public function getDefaultPageSize() - { - return $this->fieldNumberOfArticlesPerPage; - }" -Configuration,* @return string,"public function getDefaultSortId() - { - return $this->fieldShopModuleArticlelistOrderbyId; - }" -Configuration,* @return string,"public function getDefaultFilterId() - { - return $this->fieldShopModuleArticleListFilterId; - }" -Configuration,* @return string,"public function getId() - { - return $this->id; - }" -Configuration,* @return \TdbShopModuleArticleList,"public function getMaxResultLimitation() - { - return ($this->fieldNumberOfArticles > 0) ? (int) $this->fieldNumberOfArticles : null; - }" -Configuration,"* @return array","public function getDatabaseObject() - { - return $this; - }" -DbAdapter,* @var Connection,"public function getConfigurationFromInstanceId($instanceID) - { - $configuration = \TdbShopModuleArticleList::GetNewInstance(); - $configuration->LoadFromField('cms_tpl_module_instance_id', $instanceID); - - return $configuration; - }" -DbAdapter,"* @param string $instanceID - * - * @return \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\ConfigurationInterface","public function getFilterDefinitionFromId($filterId) - { - return \TdbShopModuleArticleListFilter::GetNewInstance($filterId); - }" -DbAdapter,"* @param string $filterId - * - * @return \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\FilterDefinitionInterface","public function getListResults(ConfigurationInterface $moduleConfiguration, FilterInterface $filter) - { - $query = $filter->getFilterQuery($moduleConfiguration); - $list = \TdbShopArticleList::GetList($query); - - return new Result($list); - }" -DbAdapter,"* @param \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\ConfigurationInterface $moduleConfiguration - * @param \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\FilterInterface $filter - * - * @return \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\ResultInterface","public function getSortTypeFromId($sortTypeId) - { - return \TdbShopModuleArticlelistOrderby::GetNewInstance($sortTypeId); - }" -DbAdapter,"* @param string $sortTypeId - * - * @return SortTypeInterface","public function setDatabaseConnection(Connection $connection) - { - $this->databaseConnection = $connection; - }" -DbAdapter,"* @param Connection $connection - * - * @return void","public function getSortListForConfiguration($configurationId) - { // shop_module_article_list_shop_module_articlelist_orderby_mlt - $sortList = array(); - $query = 'SELECT `shop_module_articlelist_orderby`.* - FROM `shop_module_articlelist_orderby` - INNER JOIN `shop_module_article_list_shop_module_articlelist_orderby_mlt` ON `shop_module_articlelist_orderby`.`id` = `shop_module_article_list_shop_module_articlelist_orderby_mlt`.`target_id` - WHERE `shop_module_article_list_shop_module_articlelist_orderby_mlt`.`source_id` = '.$this->getDatabaseConnection()->quote($configurationId).' - ORDER BY `shop_module_articlelist_orderby`.`position` ASC - '; - $list = \TdbShopModuleArticlelistOrderbyList::GetList($query); - while ($listItem = $list->Next()) { - $sortList[] = array( - 'id' => $listItem->id, - 'name' => $listItem->fieldNamePublic, - ); - }" -Result,* @var \TdbShopArticleList,"public function __construct(\TdbShopArticleList $content) - { - $this->content = $content; - }" -Result,@var int,"public function count() - { - return $this->content->Length(); - }" -Result,@var int,"public function setPageSize($pageSize) - { - $this->pageSize = (int) $pageSize; - - $this->transferPagingToContentObject(); - }" -Result,"* @var array - * @psalm-var array","public function getPageSize() - { - return $this->pageSize; - }" -Result,* @return void,"public function setPage($page) - { - $this->page = (int) $page; - if ($this->pageSize < 1 && 0 !== $this->page) { - throw new \InvalidArgumentException('trying to move to another page, but page size is set to infinity'); - }" -Result,* @return int,"public function getPage() - { - return $this->page; - }" -Result,* @return \TdbShopArticle[],"public function setSort(array $sort) - { - $this->sort = $sort; - $this->content->ChangeOrderBy($this->sort); - }" -Result,@var int,"public function asArray() - { - $data = array(); - $this->content->GoToStart(); - while ($item = $this->content->Next()) { - $data[] = $item; - }" -Result,"* limit result to this. pass null to remove limit. - * - * @param int $maxAllowedResults - * - * @return void","public function getNumberOfPages() - { - if ($this->pageSize < 1) { - return 1; - }" -,"* returns null if there is no page size set. - * - * @return int|null","public function getDefaultPageSize(); - - /** - * @return string - */ - public function getDefaultSortId(); - - /** - * @return string - */ - public function getDefaultFilterId(); - - /** - * @return string - */ - public function getId(); - - /** - * @return int|null - */ - public function getMaxResultLimitation(); - - /** - * @return \TdbShopModuleArticleList - */ - public function getDatabaseObject(); - - /** - * @return array - */ - public function getAsArray(); -}" -,"* @param string $instanceID - * - * @return ConfigurationInterface","public function getConfigurationFromInstanceId($instanceID); - - /** - * @param string $filterId - * - * @return FilterDefinitionInterface - */ - public function getFilterDefinitionFromId($filterId); - - /** - * @param ConfigurationInterface $moduleConfiguration - * @param FilterInterface $filter - * - * @return ResultInterface - */ - public function getListResults(ConfigurationInterface $moduleConfiguration, FilterInterface $filter); - - /** - * @param string $sortTypeId - * - * @return SortTypeInterface - */ - public function getSortTypeFromId($sortTypeId); - - /** - * @param string $configurationId - * - * @return array - */ - public function getSortListForConfiguration($configurationId); -}" -,"* @param ConfigurationInterface $moduleConfiguration - * - * @return string","public function getFilterQuery(ConfigurationInterface $moduleConfiguration); - - /** - * @return bool - */ - public function _AllowCache(); - - /** - * @return array - */ - public function _GetCacheParameters(); - - /** - * @return array - */ - public function _GetCacheTableInfos(); - - /** - * @return bool - */ - public function PreventUseOfParentObjectWhenNoRecordsAreFound(); - - /** - * @return FilterInterface - */ - public function getFallbackListFilter(); - - /** - * called when the article list module has completed the initialization. - * - * @return void - */ - public function ModuleInitHook(); -}" -,* @return int,"public function count(); - - /** - * @param int $pageSize - * - * @throws \ChameleonSystem\ShopBundle\objects\ArticleList\Exceptions\InvalidPageNumberException - * - * @return void - */ - public function setPageSize($pageSize); - - /** - * @return int - */ - public function getPageSize(); - - /** - * @param int $page - * - * @throws InvalidPageNumberException - * - * @return void - */ - public function setPage($page); - - /** - * @return int - */ - public function getPage(); - - /** - * @psalm-param array $sort - * @return void - */ - public function setSort(array $sort); - - /** - * @return \TdbShopArticle[] - */ - public function asArray(); - - /** - * @return int - */ - public function getNumberOfPages(); - - /** - * @param string|null $filterQueryString - * @return void - */ - public function addFilterQueryString($filterQueryString); - - /** - * limit result to this. pass null to remove limit. - * - * @param int $maxAllowedResults - * @return void - */ - public function setMaxAllowedResults($maxAllowedResults); -}" -,* @return string,"public function getSortString(); -}" -ArticleListFilterExecutedEvent,* @var ResultDataInterface,"public function __construct( - FilterInterface $filter, - ResultDataInterface $resultData, - ConfigurationInterface $moduleConfiguration, - StateInterface $state, - $resultFromCache = false - ) { - $this->resultData = $resultData; - $this->moduleConfiguration = $moduleConfiguration; - $this->state = $state; - $this->filter = $filter; - $this->resultFromCache = $resultFromCache; - }" -ArticleListFilterExecutedEvent,* @var ConfigurationInterface,"public function getModuleConfiguration() - { - return $this->moduleConfiguration; - }" -ArticleListFilterExecutedEvent,* @var StateInterface,"public function getResultData() - { - return $this->resultData; - }" -ArticleListFilterExecutedEvent,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\FilterInterface,"public function getState() - { - return $this->state; - }" -ArticleListFilterExecutedEvent,* @var bool,"public function getFilter() - { - return $this->filter; - }" -ArticleListFilterExecutedEvent,"* ArticleListFilterExecutedEvent constructor. - * - * @param FilterInterface $filter - * @param ResultDataInterface $resultData - * @param ConfigurationInterface $moduleConfiguration - * @param StateInterface $state - * @param bool $resultFromCache","public function isResultFromCache() - { - return $this->resultFromCache; - }" -,"* @param FilterDefinitionInterface $filterDefinition - * - * @return FilterInterface","public function createFilter(FilterDefinitionInterface $filterDefinition); - - /** - * @param FilterInterface $filter - * - * @return FilterInterface|null - */ - public function createFallbackFilter(FilterInterface $filter); -}" -,"* @param string $baseUrl - * @param StateInterface $state","public function __construct($baseUrl, StateInterface $state); - - /** - * @param int $pageNumber - * @return string - */ - public function getPageLink($pageNumber); - - /** - * @return string - */ - public function getFirstPageLink(); - - /** - * @return string - */ - public function getLastPageLink(); -}" -,"* @param int $totalNumberOfResults - * @return void","public function setTotalNumberOfResults($totalNumberOfResults); - - /** - * @return int - */ - public function getTotalNumberOfResults(); - - /** - * @return int - */ - public function count(); - - /** - * @return int - */ - public function getPage(); - - /** - * @param int $page - * - * @return $this - */ - public function setPage($page); - - /** - * @return \TdbShopArticle[] - */ - public function asArray(); - - /** - * @param \TdbShopArticle[] $items - * - * @return $this - */ - public function setItems(array $items); - - /** - * @return int - */ - public function getNumberOfPages(); - - /** - * @param int $pageSize - * - * @return $this - */ - public function setPageSize($pageSize); - - /** - * @return int - */ - public function getPageSize(); - - /** - * @return ResultInterface - */ - public function getRawResult(); - - /** - * @param ResultInterface $rawResult - * @return void - */ - public function setRawResult(ResultInterface $rawResult); -}" -,"* note: if an invalid page is requested via state, then the first page will be returned instead. - * - * @param ConfigurationInterface $moduleConfiguration - * @param StateInterface $state - * - * @return ResultDataInterface","public function createResult(ConfigurationInterface $moduleConfiguration, StateInterface $state); - - /** - * @param ConfigurationInterface $moduleConfiguration - * - * @return bool - */ - public function _AllowCache(ConfigurationInterface $moduleConfiguration); - - /** - * @param ConfigurationInterface $moduleConfiguration - * @param StateInterface $state - * - * @return array - */ - public function _GetCacheParameters(ConfigurationInterface $moduleConfiguration, StateInterface $state); - - /** - * @param ConfigurationInterface $moduleConfiguration - * - * @return array - */ - public function _GetCacheTableInfos(ConfigurationInterface $moduleConfiguration); - - /** - * @param ConfigurationInterface $moduleConfiguration - * - * @return string - */ - public function getFilterQuery(ConfigurationInterface $moduleConfiguration); - - /** - * @param ConfigurationInterface $moduleConfiguration - * - * @return void - */ - public function moduleInitHook(ConfigurationInterface $moduleConfiguration); -}" -,* @param string $sqlOrderByString,"public function __construct($sqlOrderByString); - - /** - * @return array - */ - public function getAsArray(); -}" -,* @template TNormalizedValue,"public function getKey(); - - /** - * @param mixed $value - * - * @return bool - * - * @psalm-assert TNormalizedValue $value - * - * @throws \ChameleonSystem\ShopBundle\objects\ArticleList\Exceptions\StateParameterException - */ - public function validate($value); - - /** - * @param mixed $value - * @return TNormalizedValue - */ - public function normalize($value); -}" -,"* @param StateElementInterface $stateElement - * - * @return void","public function registerStateElement(StateElementInterface $stateElement); - - /** - * @param array|null $userData - * - * @return StateInterface - */ - public function createState(array $userData = null); - - /** - * @param StateInterface $state - * @param ConfigurationInterface $configuration - * - * @return StateInterface - */ - public function createStateEnrichedWithDefaults(StateInterface $state, ConfigurationInterface $configuration); -}" -,"* @param StateElementInterface $element - * @return void","public function registerStateElement(StateElementInterface $element); - - /** - * @param string $stateString - * @return void - */ - public function setStateFromString($stateString); - - /** - * @param string $name - * @param mixed $value - * @return void - */ - public function setState($name, $value); - - /** - * returns a string representation of the state, excluding the parameter specified by varyingStateParameter. - * - * @param array|null $varyingStateParameter - * - * @return string - */ - public function getStateString(array $varyingStateParameter = null); - - /** - * @param string $name - * @param mixed $default - * @return mixed - */ - public function getState($name, $default = null); - - /** - * @return array - */ - public function getStateArray(); - - /** - * @return array - */ - public function getStateArrayWithoutQueryParameter(); - - /** - * returns an array that can be used to generate the query part of an URL identifying the state including the additional query parameters held within the state. - * - * @param string $parameterIdentifier - * @param array|null $varyingStateParameter - * - * @return array - */ - public function getStateAsUrlQueryArray($parameterIdentifier, array $varyingStateParameter = null); - - /** - * @return array - */ - public function getQueryParameter(); - - /** - * sets values in stateValues that have no value in the current state. ignores all others. - * - * @param array $stateValues - * @return void - */ - public function setUnsetStatesOnly(array $stateValues); -}" -ArticleListLegacyMapper,* maps the output of the new list to the legacy views.,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject( - 'results', - '\ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\ResultDataInterface' - ); - $oRequirements->NeedsSourceObject('items', 'array'); - $oRequirements->NeedsSourceObject('itemsMappedData', 'array'); - $oRequirements->NeedsSourceObject('listPagerUrl', 'string'); - $oRequirements->NeedsSourceObject('numberOfPages', 'int'); - $oRequirements->NeedsSourceObject('state', 'array'); - $oRequirements->NeedsSourceObject('sortList', 'array'); - $oRequirements->NeedsSourceObject('sortFieldName', 'string'); - $oRequirements->NeedsSourceObject('sortFormAction', 'string'); - $oRequirements->NeedsSourceObject('sortFormStateInputFields', 'string'); - $oRequirements->NeedsSourceObject( - 'stateObject', - '\ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\StateInterface' - ); - $oRequirements->NeedsSourceObject( - 'listConfiguration', - '\ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\ConfigurationInterface' - ); - $oRequirements->NeedsSourceObject('local', '\TdbCmsLocals'); - $oRequirements->NeedsSourceObject('currency', '\TdbPkgShopCurrency'); - - $oRequirements->NeedsSourceObject('legacyItemView', 'string'); - $oRequirements->NeedsSourceObject('sModuleSpotName', 'string'); - }" -ArticleListLegacyMapper,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - /** @var $results ResultDataInterface */ - $results = $oVisitor->GetSourceObject('results'); - - $sortList = $oVisitor->GetSourceObject('sortList'); - - $itemsMappedData = $oVisitor->GetSourceObject('itemsMappedData'); - - /** @var $stateObject StateInterface */ - $stateObject = $oVisitor->GetSourceObject('stateObject'); - - $output = array( - 'sListOptionSort' => $this->getListOptionSort( - $sortList, - $stateObject->getState(StateInterface::SORT), - $oVisitor->GetSourceObject('sortFieldName'), - $oVisitor->GetSourceObject('sortFormStateInputFields'), - $oVisitor->GetSourceObject('sortFormAction') - ), - 'oList' => $this->getListProxy( - $results, - $stateObject->getState(StateInterface::PAGE), - $stateObject->getState(StateInterface::PAGE_SIZE), - $oVisitor->GetSourceObject('listPagerUrl'), - $oVisitor->GetSourceObject('sModuleSpotName') - ), - 'listIdent' => $oVisitor->GetSourceObject('sModuleSpotName'), - 'aArticleList' => $this->getRenderedItemList($itemsMappedData, $oVisitor->GetSourceObject('legacyItemView')), - 'oLocal' => $oVisitor->GetSourceObject('local'), - 'oCurrency' => $oVisitor->GetSourceObject('currency'), - ); - - $oVisitor->SetMappedValueFromArray($output); - }" -ItemMapperNoticeList,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('itemMapperBaseData', 'array'); - $oRequirements->NeedsSourceObject('items', 'array'); - $oRequirements->NeedsSourceObject('shop', 'TdbShop'); - $oRequirements->NeedsSourceObject('local', 'TdbCmsLocals'); - $oRequirements->NeedsSourceObject('currency', 'TdbPkgShopCurrency'); - }" -ItemMapperNoticeList,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - /** @var TdbShopArticle[] $items */ - $items = $oVisitor->GetSourceObject('items'); - - $itemMapperBaseData = $oVisitor->GetSourceObject('itemMapperBaseData'); - $additionalParameter = array( - 'oShop' => $oVisitor->GetSourceObject('shop'), - 'oLocal' => $oVisitor->GetSourceObject('local'), - 'oCurrency' => $oVisitor->GetSourceObject('currency'), - ); - $additionalParameter = array_merge($itemMapperBaseData, $additionalParameter); - $oVisitor->SetMappedValue('itemsMappedData', $this->mapItems($oVisitor, $items, $additionalParameter)); - $oVisitor->SetMappedValue('legacyItemView', '/common/teaser/notice-with-hover.html.twig'); - }" -ItemMapperStandard,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('itemMapperBaseData', 'array'); - $oRequirements->NeedsSourceObject('items', 'array'); - $oRequirements->NeedsSourceObject('shop', 'TdbShop'); - $oRequirements->NeedsSourceObject('local', 'TdbCmsLocals'); - $oRequirements->NeedsSourceObject('currency', 'TdbPkgShopCurrency'); - $oRequirements->NeedsSourceObject('sModuleSpotName', 'string'); - }" -ItemMapperStandard,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - /** @var TdbShopArticle[] $items */ - $items = $oVisitor->GetSourceObject('items'); - - $itemMapperBaseData = $oVisitor->GetSourceObject('itemMapperBaseData'); - - $additionalParameter = array( - 'oShop' => $oVisitor->GetSourceObject('shop'), - 'oLocal' => $oVisitor->GetSourceObject('local'), - 'oCurrency' => $oVisitor->GetSourceObject('currency'), - ); - $additionalParameter = array_merge($itemMapperBaseData, $additionalParameter); - $oVisitor->SetMappedValue('itemsMappedData', $this->mapItems($oVisitor, $items, $additionalParameter)); - $oVisitor->SetMappedValue('legacyItemView', '/common/teaser/standard-with-hover.html.twig'); - }" -LegacyMockArticleListWrapper,* @var ResultDataInterface,"public function __construct(ResultDataInterface $result, $currentPage, $pageSize, $listPagerUrl, $sModuleSpotName) - { - $this->result = $result; - $this->currentPage = $currentPage; - $this->pageSize = $pageSize; - $this->listPagerUrl = $listPagerUrl; - $this->sModuleSpotName = $sModuleSpotName; - }" -LegacyMockArticleListWrapper,* @var int,"public function GetCurrentPageNumber() - { - return $this->currentPage + 1; - }" -LegacyMockArticleListWrapper,* @var int,"public function GetTotalPageCount() - { - return $this->result->getNumberOfPages(); - }" -LegacyMockArticleListWrapper,* @var string,"public function GetPageJumpLink($iPageNumber) - { - return str_replace('_pageNumber_', '{[pageNumber0]}" -LegacyMockArticleListWrapper,* @var string,"public function GetPageJumpLinkAsAJAXCall($iPageNumber, $bGetAsJSFunction = true) - { - $listPageUrl = $this->GetPageJumpLink($iPageNumber); - $listPageUrl .= \TTools::GetArrayAsURL(array( - 'module_fnc' => array($this->sModuleSpotName => 'ExecuteAjaxCall'), - '_fnc' => 'getRenderedList', - ), '&'); - - return $listPageUrl; - }" -LegacyMockArticleListWrapper,"* @param ResultDataInterface $result - * @param int $currentPage - * @param int $pageSize - * @param string $listPagerUrl - * @param string $sModuleSpotName","public function GetStartRecordNumber() - { - if ($this->pageSize < 1) { - return 1; - }" -LegacyMockArticleListWrapper,* @return int,"public function Length() - { - return $this->result->count(); - }" -LegacyMockArticleListWrapper,* @return int,"public function GetPageSize() - { - return $this->pageSize; - }" -ResultModification,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\DbAdapterInterface,"public function __construct(DbAdapterInterface $dbAdapter) - { - $this->dbAdapter = $dbAdapter; - }" -ResultModification,"* @param ResultInterface $result - * @param array $configuration - * @param int $filterDepth - * - * @return ResultInterface","public function apply(ResultInterface $result, array $configuration, $filterDepth) - { - return $result; - }" -ResultModification,"* @param ResultInterface $result - * @param array $configuration - * @param StateInterface $state - * - * @return ResultInterface","public function applyState(ResultInterface $result, array $configuration, StateInterface $state) - { - $result->setPageSize($state->getState(StateInterface::PAGE_SIZE)); - - $result->setPage($state->getState(StateInterface::PAGE, 0)); - - $result = $this->applySortStateToResult($result, $state->getState(StateInterface::SORT)); - - return $result; - }" -ResultModifier,* @var ResultModificationInterface[],"public function addModification(ResultModificationInterface $resultModification) - { - $this->modifications[] = $resultModification; - }" -ResultModifier,"* @param ResultInterface $result - * @param array $configuration - * @param int $filterDepth - * - * @return ResultInterface","public function apply(ResultInterface $result, array $configuration, $filterDepth) - { - foreach ($this->modifications as $modification) { - $result = $modification->apply($result, $configuration, $filterDepth); - }" -ResultModifier,"* @param ResultInterface $result - * @param array $configuration - * @param StateInterface $state - * @return ResultInterface","public function applyState(ResultInterface $result, array $configuration, StateInterface $state) - { - foreach ($this->modifications as $modification) { - $result = $modification->applyState($result, $configuration, $state); - }" -,"* @param ResultInterface $result - * @param array $configuration - * @param int $filterDepth - * - * @return ResultInterface","public function apply(ResultInterface $result, array $configuration, $filterDepth); - - /** - * @param ResultInterface $result - * @param array $configuration - * @param StateInterface $state - * - * @return ResultInterface - */ - public function applyState(ResultInterface $result, array $configuration, StateInterface $state); -}" -,"* @param ResultModificationInterface $resultModification - * @return void","public function addModification(ResultModificationInterface $resultModification); - - /** - * @param ResultInterface $result - * @param array $configuration - * @param int $filterDepth - * - * @return ResultInterface - */ - public function apply(ResultInterface $result, array $configuration, $filterDepth); - - /** - * @param ResultInterface $result - * @param array $configuration - * @param StateInterface $state - * @return ResultInterface - */ - public function applyState(ResultInterface $result, array $configuration, StateInterface $state); -}" -StateElementCurrentPage,* @implements StateElementInterface,"public function getKey() - { - return 'p'; - }" -StateElementCurrentPage,* @return string,"public function validate($value) - { - if (false === is_numeric($value)) { - throw new InvalidPageNumberException('current page must be numeric. given: '.$value); - }" -StateElementPageSize,* @implements StateElementInterface,"public function getKey() - { - return 'ps'; - }" -StateElementPageSize,* @var list,"public function validate($value) - { - if (false === is_numeric($value)) { - throw new InvalidPageSizeException(""Page size must be numeric. Given: $value""); - }" -StateElementPageSize,* @return string,"public function normalize($value) - { - $pageSize = intval($value); - if ($pageSize <= 0 && -1 !== $pageSize) { - return current($this->validOptions); - }" -StateElementPageSize,* @return void,"public function setValidOptions(array $validOptions) - { - $this->validOptions = $validOptions; - }" -StateElementQuery,* @implements StateElementInterface,"public function getKey() - { - return 'q'; - }" -StateElementQuery,* @return string,"public function validate($value) - { - return true; - }" -StateElementSort,* @implements StateElementInterface,"public function getKey() - { - return 's'; - }" -StateElementSort,"* @var mixed - * @FIXME This property is private and is never used.","public function validate($value) - { - return true; - }" -StateElementSort,* @return string,"public function normalize($value) - { - return $value; - }" -StateRequestExtractorCollection,* @var StateRequestExtractorInterface[],"public function extract(array $configuration, array $requestData, $listSpotName) - { - $data = isset($requestData[$listSpotName]) ? $requestData[$listSpotName] : array(); - foreach ($this->extractorList as $extractor) { - $data = array_merge_recursive($data, $extractor->extract($configuration, $requestData, $listSpotName)); - }" -StateRequestExtractorCollection,"* @param array $configuration - * @param array $requestData - * @param string $listSpotName - * - * @return array","public function registerExtractor(StateRequestExtractorInterface $extractor) - { - $this->extractorList[] = $extractor; - }" -,"* @param array $configuration - * @param array $requestData - * @param string $listSpotName - * - * @return mixed","public function extract(array $configuration, array $requestData, $listSpotName); - - /** - * @param StateRequestExtractorInterface $extractor - * @return void - */ - public function registerExtractor(StateRequestExtractorInterface $extractor); -}" -,"* @param array $configuration - * @param array $requestData - * @param string $listSpotName - * - * @return array","public function extract(array $configuration, array $requestData, $listSpotName); -}" -CMSShopArticleIndex,@var bool,"public function TickerIndexGeneration() - { - $this->bIndexIsRunning = true; - // see if some indexer exists - $oIndexers = TdbShopSearchIndexerList::GetList(); - // $bRegenerateCompleteIndex = false; - $oIndex = null; - if ($oIndexers->Length() < 1) { - $oIndex = TdbShopSearchIndexer::GetNewInstance(); - /** @var $oIndex TdbShopSearchIndexer */ - // $oIndex->bRegenerateCompleteIndex = $bRegenerateCompleteIndex; - $oIndex->InitializeIndexer(); - }" -CMSShopArticleIndex,@var bool,"public function ClearSearchCacheTables() - { - $sQuery = 'TRUNCATE TABLE `shop_search_cache_item`'; - \MySqlLegacySupport::getInstance()->query($sQuery); - $sQuery = 'TRUNCATE TABLE `shop_search_cache`'; - \MySqlLegacySupport::getInstance()->query($sQuery); - }" -CMSShopArticleIndex,@var float|false,"public function Execute() - { - parent::Execute(); - $this->data['bIndexIsRunning'] = $this->bIndexIsRunning; - $this->data['bPercentDone'] = $this->bPercentDone; - $this->data['bIndexCompleted'] = $this->bIndexCompleted; - - return $this->data; - }" -MTShopStatistic,"* module is used to display and export sales stats for the shop. -/*","public function Init() - { - parent::Init(); - $this->sStartDate = $this->GetUserInput('sStartDate', date('1.m.Y')); - $this->sEndDate = $this->GetUserInput('sEndDate', date('d.m.Y')); - $this->sDateGroupType = $this->GetUserInput('sDateGroupType', 'day'); - /** - * @FIXME `bShowChange` is probably meant to be a bool field. However, `GetUserInput` writes strings (probably '1' & '0') - * @psalm-suppress InvalidPropertyAssignmentValue - */ - $this->bShowChange = $this->GetUserInput('bShowChange', '0'); - - $this->sViewName = $this->GetUserInput('sViewName', 'html.table'); - $this->selectedPortalId = $this->GetUserInput('portalId', ''); - $this->portalList = $this->getPortalList(); - }" -MTShopStatistic,@var string,"public function Execute() - { - parent::Execute(); - - $this->data['oStats'] = $this->GetStats(); - //print_r($this->data['aStats']); - $this->data['sStartDate'] = $this->sStartDate; - $this->data['sEndDate'] = $this->sEndDate; - $this->data['sDateGroupType'] = $this->sDateGroupType; - $this->data['bShowChange'] = $this->bShowChange; - $this->data['sViewName'] = $this->sViewName; - $this->data['portalList'] = $this->portalList; - $this->data['selectedPortalId'] = $this->selectedPortalId; - - return $this->data; - }" -MTShopStatistic,@var string,"public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - $aIncludes[] = ' '; - $aIncludes[] = ' '; - - return $aIncludes; - }" -MTShopStatistic,@var string,"public function GetColumn($sColName) - { - // the column is the sume of the sub columns - if there are any - $dValue = 0; - if (!array_key_exists($sColName, $this->aColumns) && count($this->aSubGroups) > 0) { - if ($this->bShowGrandTotal) { - reset($this->aSubGroups); - foreach ($this->aSubGroups as $iSubGroup => $oGroupData) { - $dValue = $dValue + $oGroupData->GetColumn($sColName); - }" -MTShopStatistic,@var bool|'0'|'1',"public function AddSubgroupingForField($sFieldName) - { - // split the result by field name - }" -MTShopStatistic,@var string,"public function AddGroupValue($sName, $sQuery, $aSubGrupping = array()) - { - // subdivide by $aSubGrupping -> nested grupping.. - if (count($aSubGrupping) > 0) { - foreach ($aSubGrupping as $sField) { - }" -MTShopStatistic,@var string[],"public function Render($sViewName, $aOtherParamter = array()) - { - $oView = new TViewParser(); - /** @var $oView TViewParser */ - $oView->AddVar('oGroup', $this); - $oView->AddVarArray($aOtherParamter); - $oView->AddVar('aSubGroups', $this->aSubGroups); - - return $oView->RenderBackendModuleView($sViewName, 'MTShopStatistic', 'Customer'); - }" -MTShopStatistic,@var string,"public function GetColumnNames() - { - $aColumnNames = array_keys($this->aColumns); - if (count($this->aSubGroups)) { - reset($this->aSubGroups); - foreach ($this->aSubGroups as $oSubGroup) { - $aSubGroupColumns = $oSubGroup->GetColumnNames(); - foreach ($aSubGroupColumns as $sCol) { - if (!in_array($sCol, $aColumnNames)) { - $aColumnNames[] = $sCol; - }" -MTShopStatistic,"* @FIXME `bShowChange` is probably meant to be a bool field. However, `GetUserInput` writes strings (probably '1' & '0') - * @psalm-suppress InvalidPropertyAssignmentValue","public function GetColumnGroupDepth() - { - $iDepth = 1; - $iMaxSubDepth = 0; - reset($this->aSubGroups); - foreach ($this->aSubGroups as $oSubGroup) { - $iMaxDepth = $oSubGroup->GetColumnGroupDepth(); - $iMaxSubDepth = max($iMaxSubDepth, $iMaxDepth); - }" -,"* ENVIRONMENT_COMMON is a pseudo-environment. It is a marker to allow configuration parameters to be valid for - * all environments.","public function getEnvironment(); - - /** - * @return bool - */ - public function isCaptureOnShipment(); - - /** - * @param bool $captureOnShipment - * @return void - * @throws InvalidArgumentException - */ - public function setCaptureOnShipment($captureOnShipment); - - /** - * @param string $key - * @param mixed $default - * @return mixed - * - * Assumption: The return type is defined by the default parameter. - * @psalm-template T - * @psalm-param T $default - * @psalm-return (T is null ? mixed : T) - */ - public function getValue($key, $default = null); - - /** - * @return array - */ - public function getAllValues(); -}" -TPkgShopOrderPaymentConfig,"* @var string - * @psalm-var self::ENVIRONMENT_*","public function __construct($environment, array $configData) - { - $this->environment = $environment; - $this->data = new ParameterBag(); - - if (isset($configData['captureOnShipment'])) { - $configData['captureOnShipment'] = (true === $configData['captureOnShipment'] || 'true' === $configData['captureOnShipment'] || 1 === $configData['captureOnShipment'] || '1' === $configData['captureOnShipment']); - }" -TPkgShopOrderPaymentConfig,* @var ParameterBag,"public function getEnvironment() - { - return $this->environment; - }" -TPkgShopOrderPaymentConfig,"* @param string $environment self::ENVIRONMENT_SANDBOX or self::ENVIRONMENT_PRODUCTION - * @param string[] $configData - * @psalm-param self::ENVIRONMENT_* $environment","public function isCaptureOnShipment() - { - return $this->getValue('captureOnShipment', false); - }" -TPkgShopOrderPaymentConfig,"* @return string - self::ENVIRONMENT_PRODUCTION|self::ENVIRONMENT_SANDBOX - * @psalm-return self::ENVIRONMENT_*","public function setCaptureOnShipment($captureOnShipment) - { - if (false === is_bool($captureOnShipment)) { - throw new \InvalidArgumentException('captureOnShipment must be boolean'); - }" -TPkgShopOrderPaymentConfig,* @return bool,"public function getValue($key, $default = null) - { - return $this->data->get($key, $default); - }" -TPkgShopOrderPaymentConfig,"* @param bool $captureOnShipment - * - * @throws InvalidArgumentException - * - * @return void","public function getAllValues() - { - return $this->data->all(); - }" -TCMSCronJob_ShopSendOrderNotifications,"* resend unsent order emails flagged by TShopOrder (try n times). -/*","public function __construct(string $developmentEmailAddress, LanguageServiceInterface $languageService) - { - parent::__construct(); - $this->developmentEmailAddress = $developmentEmailAddress; - $this->languageService = $languageService; - }" -TPkgShopPaymentIPayment_TShopPaymentHandlerGroup,"* @param TPkgShopPaymentIPNRequest $oRequest - * - * @return TdbPkgShopPaymentIpnStatus|null","public function getIPNStatus(TPkgShopPaymentIPNRequest $oRequest) - { - $aPayload = $oRequest->getRequestPayload(); - $sStatusCode = null; - if (false === isset($aPayload['ret_status'])) { - return null; - }" -TPkgShop_CmsLanguage,"* Return translated page URL. - * - * @return string","public function GetTranslatedPageURL() - { - $sTranslatesPageURL = ''; - $this->TargetLanguageSimulation(true); - - // product page - $oActiveProduct = TdbShop::GetActiveItem(); - if (is_object($oActiveProduct)) { - $oNewProduct = TdbShopArticle::GetNewInstance($oActiveProduct->id, $this->id); - $oActiveProductCategory = TdbShop::GetActiveCategory(); - - $sCatId = null; - if (is_object($oActiveProductCategory)) { - $sCatId = $oActiveProductCategory->id; - }" -TShop,"* the shop config object. use GetInstance to fetch the current config. -/*","public function SetAffiliateCode($sCode) - { - $_SESSION[TdbShop::SESSION_AFFILIATE_CODE] = $sCode; - }" -TShop,"* the active search object. - * - * @var TdbShopSearchCache","public function GetAffilateCode() - { - $sCode = false; - if (array_key_exists(TdbShop::SESSION_AFFILIATE_CODE, $_SESSION)) { - $sCode = $_SESSION[TdbShop::SESSION_AFFILIATE_CODE]; - }" -TShop,"* set the affiliate partner code for the current session. - * - * @param string $sCode - * - * @return void","public function allowPurchaseAsGuest() - { - if (property_exists($this, 'fieldAllowGuestPurchase')) { - return $this->fieldAllowGuestPurchase; - }" -TShop,"* return the affiliate partner code for the current session. - * - * @return string|false","public function SetActiveSearchCacheObject(TdbShopSearchCache $oActiveSearchCache) - { - $this->oActiveSearchCache = $oActiveSearchCache; - if (!is_null($oActiveSearchCache)) { - $_SESSION[self::SESSION_ACTIVE_SEARCH_CACHE_ID] = base64_encode(serialize($oActiveSearchCache)); - }" -TShop,"* return true if guest purchases are allowed - false if a customer account is required. - * - * @return bool","public function GetActiveSearchObject() - { - if (is_null($this->oActiveSearchCache) && array_key_exists(self::SESSION_ACTIVE_SEARCH_CACHE_ID, $_SESSION)) { - $this->oActiveSearchCache = unserialize(base64_decode($_SESSION[self::SESSION_ACTIVE_SEARCH_CACHE_ID])); - // $this->oActiveSearchCache = TdbShopSearchCache::GetNewInstance(); - // if (!$this->oActiveSearchCache->Load($_SESSION[self::SESSION_ACTIVE_SEARCH_CACHE_ID])) $this->oActiveSearchCache = null; - }" -TShop,"* Factory to fetch the config for the active portal. - * Note: the method fetches the portal id through the active page, if no portal id is passed. So make sure - * an active page exists if you are not passing a portal id. - * - * @param int $iPortalId - optional portal id. method fetches the id from the TCMSActivePage if iPortalId is not given - * - * @return TdbShop - * - * @deprecated use service chameleon_system_shop.shop_service instead","public function GetDefaultCountryId() - { - // Not yet implemented - }" -TShop,"* store a copy of the active search object. - * - * @param TdbShopSearchCache $oActiveSearchCache - * - * @return void","public function GetBasketModuleSpotName() - { - return $this->fieldBasketSpotName; - }" -TShop,"* return pointer to the search cache object. - * - * @return TdbShopSearchCache","public function GetVat() - { - return $this->GetFieldShopVat(); - }" -TShop,"* return assoc array with the categories starting from the current root category - * to the current active category (in that order). return null if there is no active category. - * - * @return array|null","public function GetNextFreeOrderNumber() - { - $cmsCounter = new \esono\pkgCmsCounter\CmsCounter(\ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection')); - - return $cmsCounter->get($this, self::CMS_COUNTER_ORDER); - }" -TShop,"@var array|null $aCategoryList","public function GetNextFreeCustomerNumber() - { - $cmsCounter = new \esono\pkgCmsCounter\CmsCounter(\ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection')); - - return $cmsCounter->get($this, self::CMS_COUNTER_CUSTOMER); - }" -TShop,"* Returns the active manufacturer. - * - * @return TdbShopManufacturer|null","public function GetBasketLink($bJumpAsFarAsPossible = false, $bTargetBasketPageWithoutRedirect = false) - { - $aParams = array('module_fnc['.$this->GetBasketModuleSpotName().']' => 'JumpToBasketPage'); - if ($bJumpAsFarAsPossible) { - $aParams['bJumpAsFarAsPossible'] = '1'; - }" -TShop,"* returns the current active category. - * - * @return TdbShopCategory|null - * - * @deprecated - use the service chameleon_system_shop.shop_service instead (method getActiveCategory)","public function GetLinkToSystemPage($sSystemPageName, $aParameters = null, $bForcePortalLink = false, $sAnchorName = '') - { - if (null === $aParameters) { - $aParameters = array(); - }" -TShop,"* return the active root category. - * - * @return TdbShopCategory|null","public function getLinkToSystemPageRelative($sSystemPageName, $aParameters = null, $sAnchorName = '') - { - if (null === $aParameters) { - $aParameters = array(); - }" -TShop,"* return current active filter conditions. - * - * @return array","public function GetSystemPageNames() - { - $aSystemPages = array(); - $oPortal = self::getPortalDomainService()->getActivePortal(); - if ($oPortal) { - $aSystemPages = $oPortal->GetSystemPageNames(); - }" -TShop,"* return an sql string for the current filter. - * - * @return string - * - * @param string $sExcludeKey","public function GetLinkToSystemPageAsPopUp($sLinkText, $sSystemPageName, $aParameters = null, $bForcePortalLink = false, $iWidth = 600, $iHeight = 450, $sCSSClass = '', $sAnchorName = '') - { - $sLink = ''; - $oPortal = self::getPortalDomainService()->getActivePortal(); - if ($oPortal) { - $sLink = $oPortal->GetLinkToSystemPageAsPopUp($sLinkText, $sSystemPageName, $aParameters, $bForcePortalLink, $iWidth, $iHeight, false, $sCSSClass, $sAnchorName); - }" -TShop,"* @param string $sFilterKey - * @param string $sFilterVal - * - * @psalm-param string|TdbShopCategory::FILTER_KEY_* $sFilterKey - * - * @return string","public function GetSystemPageNodeId($sSystemPageName) - { - $systemPage = $this->getSystemPageService()->getSystemPage($sSystemPageName); - if (null === $systemPage) { - return null; - }" -TShop,@var $oCat TdbShopCategory,"public function GetShopInfo($sShopInfoName) - { - $oInfo = TdbShopSystemInfo::GetNewInstance(); - if (!$oInfo->LoadFromFields(array('shop_id' => $this->id, 'name_internal' => $sShopInfoName))) { - $oInfo = null; - }" -TShop,"* returns all fields that may be passed as filter fields. - * - * @return array","public function RenderShippingInfo($sViewName, $sViewType, $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oShop', $this); - $oShippingIntroText = $this->GetShopInfo('shipping-intro'); - $oShippingEndText = $this->GetShopInfo('shipping-end'); - $oView->AddVar('oShippingIntroText', $oShippingIntroText); - $oView->AddVar('oShippingEndText', $oShippingEndText); - - // get the shipping list for users not sigend in - $oPublicShippingGroups = TdbShopShippingGroupList::GetPublicShippingGroups(); - $oView->AddVar('oPublicShippingGroups', $oPublicShippingGroups); - - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShop,"* Get the current active item. - * - * @return TdbShopArticle|null - * - * @deprecated - use the service chameleon_system_shop.shop_service instead (method getActiveProduct)","public function GetCentralShopHandlerAjaxURL($sMethod, $aParameter = array()) - { - $oGlobal = TGlobal::instance(); - - $aParameter[MTShopCentralHandler::URL_CALLING_SPOT_NAME] = $oGlobal->GetExecutingModulePointer()->sModuleSpotName; - $aRealParams = array('module_fnc' => array($this->fieldShopCentralHandlerSpotName => 'ExecuteAjaxCall'), '_fnc' => $sMethod, MTShopCentralHandler::URL_DATA => $aParameter); - $oActivePage = self::getActivePageService()->getActivePage(); - - return $oActivePage->GetRealURLPlain($aRealParams); - }" -TShop,"* Returns the active variant for given article. - * If no Variant is active return given article. - * - * @param TdbShopArticle $oArticle - * - * @return TdbShopArticle - * - * @deprecated since 6.2.13 - replaced by ProductVariantServiceInterface::getProductBasedOnSelection()","public function GetFieldShopPrimaryNaviList() - { - $oNaviList = $this->GetFromInternalCache('oFieldShopPrimaryNaviList'); - if (is_null($oNaviList)) { - $oNaviList = TdbShopPrimaryNaviList::GetListForShopId($this->id, $this->iLanguageId); - $oNaviList->bAllowItemCache = true; - $this->SetInternalCache('oFieldShopPrimaryNaviList', $oNaviList); - }" -TShop,@var TdbShopArticle $oArticle,"public function CacheGetTriggerList() - { - return array(array('table' => $this->table, 'id' => $this->id)); - }" -TShop,@var TdbShopArticle $oArticle,"public function CacheCommit() - { - }" -TShopArticle,* @var float holds the original item price,"public function AllowDetailviewInShop() - { - return $this->isActive() && !$this->fieldVirtualArticle; - }" -TShopArticle,"* the volumn of the article. - * - * @var float","public function GetContributorList($aContributorTypes) - { - if (!is_array($aContributorTypes)) { - $aContributorTypes = array($aContributorTypes); - }" -TShopArticle,"* used to store the pre-discounted price of the article. - * - * @var array|null","public function GetBasePrice() - { - $dBasePrice = $this->GetFromInternalCache('dBasePrice'); - if (is_null($dBasePrice)) { - $dBasePrice = false; - $oUnitsOfMeasurement = $this->GetFieldShopUnitOfMeasurement(); - if ($oUnitsOfMeasurement) { - $dBasePrice = $oUnitsOfMeasurement->GetBasePrice($this->dPrice, $this->fieldQuantityInUnits); - }" -TShopArticle,* @return void,"public function GetReviewsPublished() - { - $oReviews = $this->GetFromInternalCache('oPublishedReviews'); - if (is_null($oReviews)) { - $oReviews = TdbShopArticleReviewList::GetPublishedReviews($this->id, $this->iLanguageId); - $this->SetInternalCache('oPublishedReviews', $oReviews); - }" -TShopArticle,"* return true if the item is active (ie may be shown in the detail view of the shop). - * - * @return bool","public function GetReviewAverageScore($bRecount = false) - { - if ($bRecount) { - $oReviews = $this->GetReviewsPublished(); - - return $oReviews->GetAverageScore(); - }" -TShopArticle,"* Returns Contributors for article for given types. - * - * @param array $aContributorTypes (from field 'identifier') - * - * @return TdbShopContributorList","public function GetReviewCount($bRecount = false) - { - if ($bRecount) { - $oReviews = $this->GetReviewsPublished(); - - return $oReviews->Length(); - }" -TShopArticle,"* fetch the base price of the item. - * - * @return float","public function GetVat() - { - /** @var TdbShopVat|null $oVat */ - $oVat = $this->GetFromInternalCache('ovat'); - - if (is_null($oVat)) { - $oVat = $this->getOwnVat(); - if (is_null($oVat)) { - // try to fetch from article group - $oArticleGroups = $this->GetArticleGroups(); - $oVat = $oArticleGroups->GetMaxVat(); - }" -TShopArticle,"* return the base price for 1 base unit as defined through the shop_unit_of_measurement and quantity_in_units. - * - * @return float|bool","public function getLink($bAbsolute = false, $sAnchor = null, $aOptionalParameters = array(), \TdbCmsPortal $portal = null, \TdbCmsLanguage $language = null) - { - // if no category is given, fetch the first category of the article - $shopService = $this->getShopService(); - $oShop = $shopService->getActiveShop(); - $sCategoryId = null; - if (true === array_key_exists(TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY, $aOptionalParameters)) { - $sCategoryId = $aOptionalParameters[TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY]; - unset($aOptionalParameters[TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY]); - }" -TShopArticle,"* return all published reviews for the article. - * - * @return TdbShopArticleReviewList","public function GetDetailLink($bIncludePortalLink = false, $iCategoryId = null) - { - return $this->getLink( - $bIncludePortalLink, - null, - array(TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY => $iCategoryId) - ); - }" -TShopArticle,"* return the average rating of the article based on the customer reviews for the article. - * - * @param bool $bRecount - force a recount of the actual data - * - * @return float","public function GetReviewFormLink($bIncludePortalLink = false, $iCategoryId = null) - { - return $this->GetDetailLink($bIncludePortalLink, $iCategoryId).'#review'.TGlobal::OutHTML($this->id); - }" -TShopArticle,"* return the total number of reviews (published). - * - * @param bool $bRecount - force a recount of the actual data - * - * @return int","public function GetToBasketLink($bIncludePortalLink = false, $bRedirectToBasket = false, $bReplaceBasketContents = false, $bGetAjaxParameter = false, $sMessageConsumer = MTShopBasketCore::MSG_CONSUMER_NAME_MINIBASKET) - { - $sLink = ''; - $aParameters = $this->GetToBasketLinkParameters($bRedirectToBasket, $bReplaceBasketContents, $bGetAjaxParameter, $sMessageConsumer); - // convert module_fnc to array to string - $aIncludeParams = TdbShop::GetURLPageStateParameters(); - $oGlobal = TGlobal::instance(); - foreach ($aIncludeParams as $sKeyName) { - if ($oGlobal->UserDataExists($sKeyName) && !array_key_exists($sKeyName, $aParameters)) { - $aParameters[$sKeyName] = $oGlobal->GetUserData($sKeyName); - }" -TShopArticle,"* return the vat group of the article. - * - * @return TdbShopVat|null","public function GetToBasketLinkForExternalCalls() - { - return 'http://'.$this->getPortalDomainService()->getActiveDomain()->getInsecureDomainName().'/'.TdbShopArticle::URL_EXTERNAL_TO_BASKET_REQUEST.'/id/'.urlencode($this->id); - }" -TShopArticle,@var TdbShopVat|null $oVat,"public function GetToBasketLinkParameters($bRedirectToBasket = false, $bReplaceBasketContents = false, $bGetAjaxParameter = false, $sMessageConsumer = MTShopBasketCore::MSG_CONSUMER_NAME_MINIBASKET) - { - $aParameters = $this->getToBasketLinkBasketParameters($bRedirectToBasket, $bReplaceBasketContents, $bGetAjaxParameter, $sMessageConsumer); - $aParameters = $this->getToBasketLinkOtherParameters($aParameters); - - return $aParameters; - }" -TShopArticle,"* Returns the VAT based on $fieldShopVatId. - * When saving through the table editor, fields are not initialized, - * so we are falling back to the value from sqlData here - * (this is a workaround chosen for simplicity, this would need to be changed in the table editor instead). - * - * @return TdbShopVat|null","public function GetToNoticeListLink($bIncludePortalLink = false, $sMsgConsumerName = false) - { - if (false === $sMsgConsumerName) { - $sMsgConsumerName = $this->GetMessageConsumerName(); - }" -TShopArticle,"* return the link to the detail view of the product. - * - * @param bool $bAbsolute set to true to include the domain in the link - * @param string|null $sAnchor - * @param array $aOptionalParameters supported optional parameters: - * TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY - (string) force the article link to be within the given category id (only works if the category is assigned to the article) - * @param TdbCmsPortal|null $portal - * @param TdbCmsLanguage|null $language - * - * @return string","public function GetRemoveFromNoticeListLink($bIncludePortalLink = false, $sMsgConsumerName = false) - { - $oShopConfig = TdbShop::GetInstance(); - if (false === $sMsgConsumerName) { - $sMsgConsumerName = $this->GetMessageConsumerName(); - }" -TShopArticle,"* @deprecated use new getLink($sAnchor = null, $bAbsolute = false, $aOptionalParameters = array()) method - see method documentation how to pass old parameters - * - * return the link to the detail view of the product - * - * @param bool $bIncludePortalLink - set to true to include the domain in the link - * @param int $iCategoryId - pass a category to force a category (only works if the category is assigned to the article) - * - * @return string","public function GetPrimaryCategory() - { - $oCategory = null; - // if this is a variant, then we want to take the parent object instead - at least if no data is set for the child - if (!empty($this->fieldShopCategoryId)) { - $oCategory = $this->GetFieldShopCategory(); - if (!is_null($oCategory) && false == $oCategory->AllowDisplayInShop()) { - $oCategory = null; - }" -TShopArticle,"* return the link to the detail view of the product (classic URL). - * - * @param bool $bIncludePortalLink - set to true to include the domain in the link - * @param int $iCategoryId - pass a category to force a category (only works if the category is assigned to the article) - * - * @return string","public function GetFieldShopCategoryList($sOrderBy = '') - { - $oCategories = $this->GetFromInternalCache('oCategories'); - if (is_null($oCategories)) { - $oCategories = TdbShopCategoryList::GetArticleCategories($this->id, $this->iLanguageId); - $this->SetInternalCache('oCategories', $oCategories); - }" -TShopArticle,@var $oCategory TdbShopCategory,"public function GetArticleGroups() - { - $oArticleGroups = $this->GetFromInternalCache('oArticleGroups'); - if (is_null($oArticleGroups)) { - $oArticleGroups = TdbShopArticleGroupList::GetArticleGroups($this->id); - $this->SetInternalCache('oArticleGroups', $oArticleGroups); - }" -TShopArticle,"* a better SEO URL (depends on TCMSSmartURLHandler_ShopProductV2). - * - * @param bool $bIncludePortalLink - set to true to include the domain in the link - * @param int $iCategoryId - pass a category to force a category (only works if the category is assigned to the article) - * @param TdbCmsPortal $portal - * @param TdbCmsLanguage $language - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array(), $bAllowCache = true) - { - if (!$this->IsVariant()) { - $sActiveVariantForCurrentSpot = TdbShop::GetRegisteredActiveVariantForCurrentSpot($this->id); - if (false != $sActiveVariantForCurrentSpot) { - // render the variant instead of the current article - $oVariant = TdbShopArticle::GetNewInstance(); - /** @var $oVariant TdbShopArticle */ - $oVariant->Load($sActiveVariantForCurrentSpot); - - return $oVariant->Render($sViewName, $sViewType, $aCallTimeVars); - }" -TShopArticle,"* return the link to the review page of the product. - * - * @param bool $bIncludePortalLink - set to true to include the domain in the link - * @param int $iCategoryId - pass a category to force a category (only works if the category is assigned to the article) - * - * @return string","public function RenderPreviewThumbnail($sImageSizeName, $sViewName = 'simple', $sViewType = 'Core', $aEffects = array()) - { - $sHTML = ''; - $oPreviewImage = $this->GetImagePreviewObject($sImageSizeName); - if (!is_null($oPreviewImage)) { - $sHTML = $oPreviewImage->Render($sViewName, $sViewType, $aEffects); - }" -TShopArticle,"* generates a link that can be used to add this product to the basket. - * - * @param bool $bIncludePortalLink - include domain in link - * @param bool $bRedirectToBasket - redirect to basket page after adding product - * @param bool $bReplaceBasketContents - set to true if you want the contents of the basket to be replaced by the product wenn added to basket - * @param bool $bGetAjaxParameter - set to true if you want to get basket link for ajax call - * @param string $sMessageConsumer - set custom message consumer - * - * @return string","public function GetPrimaryImage() - { - /** @var TdbShopArticleImage|null $oPrimaryImage */ - $oPrimaryImage = $this->GetFromInternalCache('oPrimaryImage'); - - if (is_null($oPrimaryImage)) { - if (!empty($this->fieldCmsMediaDefaultPreviewImageId) && (!is_numeric($this->fieldCmsMediaDefaultPreviewImageId) || intval($this->fieldCmsMediaDefaultPreviewImageId) > 1000)) { - $oShop = TdbShop::GetInstance(); - $aData = array('shop_article_id' => $this->id, 'cms_media_id' => $this->fieldCmsMediaDefaultPreviewImageId, 'position' => 1); - $oPrimaryImage = TdbShopArticleImage::GetNewInstance(); - $oPrimaryImage->LoadFromRow($aData); - }" -TShopArticle,"* Creates to basket link from given to basket parameters. - * - * @param array $aParameters - * @param bool $bIncludePortalLink - * - * @return string","public function GetImagePreviewObject($sImageSizeName) - { - // check if the type has been defined... - $oPreviewObject = TdbShopArticlePreviewImage::GetNewInstance(); - - if (!$oPreviewObject->LoadByName($this, $sImageSizeName)) { - // if the article is a varaint, try the parent - if ($this->IsVariant()) { - $oParent = $this->GetFieldVariantParent(); - $oPreviewObject = null; - if (null != $oParent) { - $oPreviewObject = $oParent->GetImagePreviewObject($sImageSizeName); - }" -TShopArticle,@var Request $request,"public function IsInArticleGroups($aGroupList) - { - $bIsInGroups = false; - $aArticleGroups = $this->GetMLTIdList('shop_article_group'); - $aIntersec = array_intersect($aArticleGroups, $aGroupList); - - if (0 == count($aIntersec) && 0 == count($aArticleGroups) && $this->IsVariant()) { - $oParent = $this->GetFieldVariantParent(); - if ($oParent) { - $bIsInGroups = $oParent->IsInArticleGroups($aGroupList); - }" -TShopArticle,"* returns a url to place the item in the basket from an external location. - * - * @return string","public function GetExportObject() - { - $oExportObject = new stdClass(); - $oExportObject->id = $this->id; - foreach ($this as $sPropName => $sPropVal) { - if ('field' == substr($sPropName, 0, 5)) { - $oExportObject->{$sPropName}" -TShopArticle,"* return parameters needed for a to basket call. - * - * @param bool $bRedirectToBasket - redirect to basket page after adding product - * @param bool $bReplaceBasketContents - set to true if you want the contents of the basket to be replaced by the product wenn added to basket - * @param bool $bGetAjaxParameter - set to true if you want to get basket link for ajax call - * @param string $sMessageConsumer - set custom message consumer - * - * @return array","public function IsInCategory($aCategoryList) - { - $bIsInCategory = false; - if (in_array($this->fieldShopCategoryId, $aCategoryList)) { - $bIsInCategory = true; - }" -TShopArticle,"* generate a link used to add the article to the notice list. - * - * @param bool $bIncludePortalLink - include domain in link - * @param bool $sMsgConsumerName - * - * @return string","public function UpdateProductViewCount() - { - if (CMS_SHOP_TRACK_ARTICLE_DETAIL_VIEWS && !is_null($this->id)) { - $this->getProductStatsService()->add($this->id, ProductStatisticsServiceInterface::TYPE_DETAIL_VIEWS, 1); - }" -TShopArticle,"* return link that can be used to remove the item from the notice list. - * - * @param bool $bIncludePortalLink - * @param string|false $sMsgConsumerName - * - * @return string","public function UpdateStatsReviews() - { - $sArticleId = $this->id; - if ($this->IsVariant()) { - $sArticleId = $this->fieldVariantParentId; - }" -TShopArticle,"* return the primary category of the article (usually just the first one found. - * - * @return TdbShopCategory|null","public function GetMetaKeywords() - { - if (strlen(trim(strip_tags($this->fieldMetaKeywords))) > 0) { - $aKeywords = explode(',', trim(strip_tags($this->fieldMetaKeywords))); - }" -TShopArticle,@var TdbShopCategory $oCategory,"public function GetMetaDescription() - { - $sDes = trim($this->fieldMetaDescription); - if (empty($sDes)) { - $sDes = mb_substr(strip_tags($this->fieldDescriptionShort.' '.$this->fieldDescription), 0, 160); - $sDes = trim($sDes); - if (empty($sDes)) { - $sDes = $this->fieldName; - }" -TShopArticle,"* return all categories assigned to the article. - * - * @param string $sOrderBy - * - * @return TdbShopCategoryList","public function GetOwningBundleItem() - { - /** @var TdbShopArticle|null $oOwningBundleItem */ - $oOwningBundleItem = $this->GetFromInternalCache('oOwningBundleItem'); - - if (is_null($oOwningBundleItem)) { - $oOwningBundleItem = false; - if (!is_null($this->id)) { - $query = ""SELECT `shop_article`.* - FROM `shop_article` - INNER JOIN `shop_bundle_article` ON `shop_article`.`id` = `shop_bundle_article`.`shop_article_id` - WHERE `shop_bundle_article`.`bundle_article_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' - ""; - if ($aOwner = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { - $oOwningBundleItem = TdbShopArticle::GetNewInstance(); - $oOwningBundleItem->LoadFromRow($aOwner); - }" -TShopArticle,"* return all article groups assigend to the article. - * - * @return TdbShopArticleGroupList","public function GetOwningBundleConnection() - { - /** @var TdbShopBundleArticle|null $oOwningBundleConnection */ - $oOwningBundleConnection = $this->GetFromInternalCache('oOwningBundleConnection'); - - if (is_null($oOwningBundleConnection)) { - $oOwningBundleConnection = false; - if (!is_null($this->id)) { - $oOwningOrderItem = TdbShopBundleArticle::GetNewInstance(); - /** @var $oOwningOrderItem TdbShopBundleArticle */ - if (!$oOwningOrderItem->LoadFromField('bundle_article_id', $this->id)) { - $oOwningOrderItem = false; - }" -TShopArticle,"* used to display an article. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * @param bool $bAllowCache - set to false if you want to suppress caching for the call - * - * @return string","public function BelongsToABundle() - { - return false !== $this->GetOwningBundleConnection(); - }" -TShopArticle,@var $oVariant TdbShopArticle,"public function IsVariant() - { - return !empty($this->fieldVariantParentId); - }" -TShopArticle,"* uses message manager to render messages and return them as string. - * - * @param string[] $aMessageConsumerToCheck - * - * @return string","public function HasVariants($bCheckForActiveVariantsOnly = false) - { - if ($this->IsVariant()) { - return false; - }" -TShopArticle,"* add cache parameters (trigger clear for render). - * - * @param array $aCacheParameters - * - * @return void","public function GetFieldShopArticleVariantsList($aSelectedTypeValues = array(), $bLoadOnlyActive = true) - { - $sKey = 'oFieldShopArticleVariantsList'.serialize($aSelectedTypeValues); - if ($bLoadOnlyActive) { - $sKey .= 'active'; - }" -TShopArticle,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function GetLowestPricedVariant() - { - $oLowestPrictedVariant = null; - - $oVariants = $this->GetFieldShopArticleVariantsList(); - while ($oVariant = $oVariants->Next()) { - if (is_null($oLowestPrictedVariant) || $oVariant->fieldPrice < $oLowestPrictedVariant->fieldPrice) { - $oLowestPrictedVariant = $oVariant; - }" -TShopArticle,"* return the preview image for the article using the image size given by sImageSizeName - * Note: if the article has no image, then the view 'no-preview-image-defined' in the article object view dir - * will be rendered instead (viewType will be the same as passed to this function - so make sure to define the view - * in your extensions if you call this method with sViewType = 'Customer'. - * - * @param string $sImageSizeName - sImageSizeName is a system name defined in the shop_article_image_size table - * @param string $sViewName - use view name to render the image using different views (views can be found in ./objectviews/shop/TShopArticlePreviewImage) - * @param string $sViewType - defines in which objectviews dir the system looks for the view (Core, Custom-Core, or Customer) - * @param string[] $aEffects - * - * @return string","public function GetFieldShopVariantTypeValueList($sOrderBy = '') - { - $oVariantValueList = $this->GetFromInternalCache('oFieldShopVariantTypeValueList'); - if (is_null($oVariantValueList)) { - $query = ""SELECT `shop_variant_type_value`.* - FROM `shop_variant_type_value` - INNER JOIN `shop_variant_type` ON `shop_variant_type_value`.`shop_variant_type_id` = `shop_variant_type`.`id` - INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id` - WHERE `shop_article_shop_variant_type_value_mlt`.`source_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' - ORDER BY `shop_variant_type`.`position` - ""; - $oVariantValueList = TdbShopVariantTypeValueList::GetList($query, $this->iLanguageId); - $this->SetInternalCache('oFieldShopVariantTypeValueList', $oVariantValueList); - }" -TShopArticle,@var $oView TViewParser,"public function getVariantIDList($aSelectedTypeValues = array(), $bLoadActiveOnly = true) - { - $aArticleIdList = array(); - $oVariantList = null; - if ($this->IsVariant()) { - $oParent = $this->GetFieldVariantParent(); - $oVariantList = $oParent->GetFieldShopArticleVariantsList($aSelectedTypeValues, $bLoadActiveOnly); - }" -TShopArticle,"* return the primary image object of the shop article. this is either the cms_media_default_preview_image_id - * or the first image in the image list. - * - * @return TdbShopArticleImage|null","public function GetVariantValuesAvailableForType($oVariantType, $aSelectedTypeValues = array()) - { - $oVariantValueList = null; - $aArticleIdList = $this->getVariantIDList($aSelectedTypeValues, true); - - if (count($aArticleIdList) > 0) { - $query = ""SELECT `shop_variant_type_value`.* - FROM `shop_variant_type_value` - INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id` - WHERE `shop_variant_type_value`.`shop_variant_type_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->id).""' - AND `shop_article_shop_variant_type_value_mlt`.`source_id` IN ('"".implode(""','"", $aArticleIdList).""') - GROUP BY `shop_variant_type_value`.`id` - ORDER BY `shop_variant_type_value`.`"".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->fieldShopVariantTypeValueCmsfieldname).'` - '; - - $oVariantValueList = TdbShopVariantTypeValueList::GetList($query); - }" -TShopArticle,@var TdbShopArticleImage|null $oPrimaryImage,"public function GetVariantValuesAvailableForTypeIncludingInActive($oVariantType, $aSelectedTypeValues = array()) - { - $oVariantValueList = null; - $aArticleIdList = $this->getVariantIDList($aSelectedTypeValues, false); - - if (count($aArticleIdList) > 0) { - $query = ""SELECT `shop_variant_type_value`.*, SUM(CASE WHEN `shop_article`.`active` = '1' THEN 1 ELSE 0 END) AS articleactive - FROM `shop_variant_type_value` - INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id` - LEFT JOIN `shop_article` ON `shop_article`.`id` = `shop_article_shop_variant_type_value_mlt`.`source_id` - WHERE `shop_variant_type_value`.`shop_variant_type_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->id).""' - AND `shop_article_shop_variant_type_value_mlt`.`source_id` IN ('"".implode(""','"", $aArticleIdList).""') - GROUP BY `shop_variant_type_value`.`id` - ORDER BY `shop_variant_type_value`.`"".MySqlLegacySupport::getInstance()->real_escape_string($oVariantType->fieldShopVariantTypeValueCmsfieldname).'` - '; - $oVariantValueList = TdbShopVariantTypeValueList::GetList($query); - }" -TShopArticle,"* Enter description here... - * - * @param string $sImageSizeName - the image size name (found in shop_article_image_size) - * - * @return TdbShopArticlePreviewImage|null","public function GetVariantsForVariantTypeName($sVariantTypeIdentifier) - { - /** @var TdbShopArticleList|null $oArticleList */ - $oArticleList = $this->GetFromInternalCache('VariantsForVariantTypeName'.$sVariantTypeIdentifier); - - if (is_null($oArticleList)) { - $oArticleList = null; - $oVariantSet = $this->GetFieldShopVariantSet(); - if (!is_null($oVariantSet)) { - $oVariantType = $oVariantSet->GetVariantTypeForIdentifier($sVariantTypeIdentifier); - if (!is_null($oVariantType)) { - $sQueryAddition = ''; - if ($this->IsVariant()) { - $sCommmonParentId = $this->fieldVariantParentId; - // make sure the current article is part of the list - $sActingValueForTypeId = $this->GetVariantTypeActiveValue($oVariantType->id); - $sQueryAddition .= ""AND ((`shop_article`.`id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' AND `shop_variant_type_value`.`id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sActingValueForTypeId).""') OR (`shop_article`.`id` != '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' AND `shop_variant_type_value`.`id` != '"".MySqlLegacySupport::getInstance()->real_escape_string($sActingValueForTypeId).""'))""; - }" -TShopArticle,"* returns an array with all table names that are relevant for the render function. - * - * @param string $sViewName - the view name being requested (if know by the caller) - * @param string $sViewType - the view type (core, custom-core, customer) being requested (if know by the caller) - * - * @return string[]","public function GetActiveVariantValue($sVariantTypeIdentifier) - { - $oVariantValueObject = null; - - /** - * Use variant type name as key - * @var array|null $aVariantValues - */ - $aVariantValues = $this->GetFromInternalCache('aActiveVariantValues'); - - if (is_null($aVariantValues)) { - $query = ""SELECT `shop_variant_type_value`.*, `shop_variant_type`.`identifier` AS variantTypeName - FROM `shop_variant_type_value` - INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id` - INNER JOIN `shop_variant_type` ON `shop_variant_type_value`.`shop_variant_type_id` = `shop_variant_type`.`id` - WHERE `shop_article_shop_variant_type_value_mlt`.`source_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' - ""; - $oVariantValues = TdbShopVariantTypeValueList::GetList($query); - while ($oVariantValue = $oVariantValues->Next()) { - $aVariantValues[$oVariantValue->sqlData['variantTypeName']] = $oVariantValue; - }" -TShopArticle,"* return true if the article is in at least one of the groups. - * - * @param array $aGroupList - * - * @return bool","public function GetVariantTypeActiveValue($sVariantTypeId) - { - $sValue = false; - - /** - * Mapping of variant type id => variant type values id - * @var array|null $aVariantValueIds - */ - $aVariantValueIds = $this->GetFromInternalCache('aActiveVariantValueIds'); - - if (is_null($aVariantValueIds)) { - $oValueList = $this->GetFieldShopVariantTypeValueList(); - while ($oValue = $oValueList->Next()) { - $aVariantValueIds[$oValue->fieldShopVariantTypeId] = $oValue->id; - }" -TShopArticle,"* returns an article object with additional elements needed for exports and - * interfaces like full URL image links, attachment links and so on. - * - * When called from CMS BackEnd it WILL use the first portal/shop found - * - * @return stdClass","public function RenderVariantSelection($sViewName = 'vStandard', $sViewType = 'Customer') - { - $sHTML = ''; - $oVariantSet = null; - if ($this->IsVariant()) { - $oParent = $this->GetFieldVariantParent(); - - $oVariantSet = $oParent->GetFieldShopVariantSet(); - }" -TShopArticle,"* return true if the article is in at least one of the categories. - * - * @param array $aCategoryList - * - * @return bool","public function GetVariantFromValues($aTypeValuePairs) - { - $oArticle = null; - if (!$this->IsVariant()) { - $query = ""SELECT `shop_article`.* - FROM `shop_article` - INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_article`.`id` = `shop_article_shop_variant_type_value_mlt`.`source_id` - INNER JOIN `shop_variant_type_value` ON `shop_article_shop_variant_type_value_mlt`.`target_id` = `shop_variant_type_value`.`id` - WHERE `shop_article`.`variant_parent_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' - ""; - $aParts = array(); - foreach ($aTypeValuePairs as $sVariantTypeId => $sVariantTypeValueId) { - $aParts[] = ""`shop_variant_type_value`.`shop_variant_type_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sVariantTypeId).""' AND `shop_variant_type_value`.`id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sVariantTypeValueId).""'""; - }" -TShopArticle,"* increase the product view counter by one. - * - * @return void","public function GetFieldShopArticleImageList() - { - $oImages = $this->GetFromInternalCache('FieldShopArticleImageList'); - if (is_null($oImages)) { - $query = TdbShopArticleImageList::GetDefaultQuery($this->iLanguageId, ""`shop_article_image`.`shop_article_id`= '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' AND `shop_article_image`.`cms_media_id` NOT IN ('','0','1','2','3','4','5','6','7','8','9','11','12','13','14')""); // exclude broken records and template images - $oImages = TdbShopArticleImageList::GetList($query); - $oImages->bAllowItemCache = true; - if (0 == $oImages->Length() && $this->IsVariant()) { - $oParent = $this->GetFieldVariantParent(); - if ($oParent) { - $oImages = $oParent->GetFieldShopArticleImageList(); - }" -TShopArticle,"* updates the review stats for the article. - * - * @return void","public function GetMessageConsumerName() - { - $sId = $this->id; - if ($this->IsVariant()) { - $sId = $this->fieldVariantParentId; - }" -TShopArticle,"* return keywords for the meta tag on article detail pages. - * - * @return array","public function GetFieldShopBundleArticleList() - { - $oBundleList = parent::GetFieldShopBundleArticleList(); - if (0 == $oBundleList->Length() && $this->IsVariant()) { - $oBundleList = $this->GetFieldVariantParent()->GetFieldShopBundleArticleList(); - }" -TShopArticle,"* return meta description. - * - * @return string","public function GetFieldShopArticleMarkerList($sOrderBy = '') - { - $oMarkerList = $this->GetMLT('shop_article_marker_mlt', 'TdbShopArticleMarker', $sOrderBy, 'CMSDataObjects', 'Core'); - if (0 == $oMarkerList->Length() && $this->IsVariant()) { - $oMarkerList = $this->GetFieldVariantParent()->GetFieldShopArticleMarkerList($sOrderBy); - }" -TShopArticle,"* loads the owning bundle order item IF this item belongs to a bundle. returns false if it is not. - * - * @return TdbShopArticle|false","public function GetFieldShopAttributeValueList($sOrderBy = '') - { - $oAttributeValueList = parent::GetFieldShopAttributeValueList($sOrderBy); - if (0 == $oAttributeValueList->Length() && $this->IsVariant()) { - $oAttributeValueList = $this->GetFieldVariantParent()->GetFieldShopAttributeValueList($sOrderBy); - }" -TShopArticle,@var TdbShopArticle|null $oOwningBundleItem,"public function GetNameSEO() - { - $sFullProductName = $this->GetFromInternalCache('sFullSEOName'); - if (is_null($sFullProductName)) { - $sFullProductName = ''; - $oManufacturer = $this->GetFieldShopManufacturer(); - if ($oManufacturer) { - $sFullProductName .= $oManufacturer->fieldName.': '; - }" -TShopArticle,"* if this order item belongs to a bundle, then this method will return the connecting table. - * - * @return TdbShopBundleArticle|false","public function GetBreadcrumbName() - { - return $this->GetName(); - }" -TShopArticle,@var TdbShopBundleArticle|null $oOwningBundleConnection,"public function GetSeoPattern(&$sPaternIn) - { - //$sPaternIn = ""[{PORTAL_NAME}" -TShopArticle,@var $oOwningOrderItem TdbShopBundleArticle,"public function GetFieldShopVariantSet() - { - /** @var TdbShopVariantSet|null $oItem */ - $oItem = $this->GetFromInternalCache('oFieldShopVariantSet'); - - if (null === $oItem) { - $oItem = parent::GetFieldShopVariantSet(); - if (null === $oItem && $this->IsVariant()) { - $oParent = $this->GetFieldVariantParent(); - $oItem = $oParent->GetFieldShopVariantSet(); - }" -TShopArticle,"* returns true if the item belongs to a bundle. - * - * @return bool","public function IsBuyable() - { - $bIsBuyable = $this->GetFromInternalCache('bIsBuyable'); - if (is_null($bIsBuyable)) { - $bIsBuyable = $this->isActive(); - if ($bIsBuyable) { - $oShopConfig = TdbShop::GetInstance(); - - if (isset($oShopConfig->fieldAllowPurchaseOfVariantParents) && - !$oShopConfig->fieldAllowPurchaseOfVariantParents && - ($this->HasVariants() || ('' != $this->fieldShopVariantSetId && false === $this->IsVariant()))) { - $bIsBuyable = false; - }" -TShopArticle,"* return true if the article is a variant. - * - * @return bool","public function UpdateStock($dNewStockValue, $bNewAmountIsDelta = false, $bUpdateSaleCounter = false, $bForceUpdate = false) - { - if ($this->HasVariants()) { - return false; - }" -TShopArticle,"* return true if the article has variants. - * - * @param bool $bCheckForActiveVariantsOnly - * - * @return bool","public function setIsActive($isActive) - { - if ($this->fieldActive === $isActive) { - return; - }" -TShopArticle,"* load list of article variants. - * - * @param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...) - * @param bool $bLoadOnlyActive - * - * @return TdbShopArticleList","public function setVariantParentActive($parentId, $isActive) - { - if (true === $isActive) { - $activeValue = 1; - }" -TShopArticle,"* return variant with the lowest price. - * - * @return TdbShopArticle|null","public function CheckActivateOrDeactivate($dNewStockValue = null) - { - if (null === $dNewStockValue) { - $dNewStockValue = $this->getAvailableStock(); - }" -TShopArticle,* {@inheritdoc},"public function GetFieldShopStockMessage() - { - $oItem = $this->GetFromInternalCache('oLookupshop_stock_message_id'); - if (null === $oItem) { - $oItem = $this->getShopStockMessageDataAccess()->getStockMessage($this->fieldShopStockMessageId, $this->iLanguageId); - if (null !== $oItem) { - $this->SetInternalCache('oLookupshop_stock_message_id', $oItem); - }" -TShopArticle,"* returns an array of IDs of all variant articles of this article. - * - * @param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...) - * @param bool $bLoadActiveOnly - set to false if you want to load inactive articles too - * - * @return array","public function TotalStockAvailable() - { - $bStock = $this->getAvailableStock(); - // if the article is set to auto deactivate on zero stock, we have a limited - // supply. if on the other hand, the article remains active on zero stock, we have an - // unlimited supply - if (1 == $this->CheckActivateOrDeactivate(0)) { - // we may also not allow any more purchases than available stock, if the article is marked as show_preorder_on_zero_stock - if (false == $this->fieldShowPreorderOnZeroStock) { - $bStock = 999999; - }" -TShopArticle,"* return all variant values that are available for the given type and this article. - * - * @param TdbShopVariantType $oVariantType - * @param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...) - * - * @return TdbShopVariantTypeValueList|null","public function getAvailableStock() - { - return $this->getInventoryService()->getAvailableStock($this->id); - }" -TShopArticle,"* return all variant values that are available for the given type and this article. - * - * @param TdbShopVariantType $oVariantType - * @param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...) - * - * @return TdbShopVariantTypeValueList|null","public function GetDiscountList($bIncludeUserRestrictedDiscounts = false) - { - $sDiscountListKey = 'oArticlePotentialDiscountList'; - if ($bIncludeUserRestrictedDiscounts) { - $sDiscountListKey .= '-IncludesUserDiscounts'; - }" -TShopArticle,"* returns a list of variants for the current article each with a unqiue value for $sVariantTypeIdentifier. - * - * @param string $sVariantTypeIdentifier - * - * @return TdbShopArticleList|null","public function GetPriceIfDiscounted() - { - $dPrice = $this->GetFromInternalCache('dDiscountedPrice'); - if (is_null($dPrice)) { - $dPrice = $this->dPrice; - $dDiscountSum = 0; - $oDiscountList = $this->GetDiscountList(); - if ($oDiscountList && $oDiscountList->Length() > 0) { - $oDiscountList->GoToStart(); - while ($oDiscount = $oDiscountList->Next()) { - if ('prozent' == $oDiscount->fieldValueType) { - $dDiscountSum += round($dPrice * ($oDiscount->fieldValue / 100), 2); - }" -TShopArticle,@var TdbShopArticleList|null $oArticleList,"public function SetPriceBasedOnActiveDiscounts() - { - // this should only ever be executed once... - $bDiscountedPriceUsed = $this->GetFromInternalCache('bDiscountedPriceUsed'); - if (is_null($bDiscountedPriceUsed) || false == $bDiscountedPriceUsed) { - $bDiscountedPriceUsed = true; - $dDiscountValue = $this->GetPriceIfDiscounted(); - if ($dDiscountValue < $this->fieldPrice) { - $this->aPriceBeforeDiscount['fieldPrice'] = $this->fieldPrice; - $this->aPriceBeforeDiscount['fieldPriceReference'] = $this->fieldPriceReference; - $oLocal = TCMSLocal::GetActive(); - $this->fieldPriceReference = $this->fieldPrice; - $this->fieldPriceReferenceFormated = $this->fieldPriceFormated; - $this->fieldPrice = $dDiscountValue; - $this->fieldPriceFormated = $oLocal->FormatNumber($dDiscountValue, 2); - $this->dPrice = $this->fieldPrice; - }" -TShopArticle,"* returns the variant type value for the given identifier. - * - * note: there was a typo in the method name GetActiveVaraintValue - * please change your custom code to use the renamed method - * (the old method name is redirected, but will be removed in the future) - * - * @param string $sVariantTypeIdentifier - * - * @return TdbShopVariantTypeValue|null - returns null if $sVariantTypeIdentifier was not found","public function getPriceWithoutActiveDiscounts() - { - if (true === isset($this->aPriceBeforeDiscount['fieldPrice'])) { - return $this->aPriceBeforeDiscount['fieldPrice']; - }" -TShopArticle,"* Use variant type name as key - * @var array|null $aVariantValues","public function getPriceReferenceWithoutActiveDiscounts() - { - if (true === isset($this->aPriceBeforeDiscount['fieldPriceReference'])) { - return $this->aPriceBeforeDiscount['fieldPriceReference']; - }" -TShopArticle,"* returns the id of the active value for the given variant type. - * - * @param string $sVariantTypeId - * - * @return string|false","public function __call($name, $arguments) - { - $aBackwardsCompatMethods = array(); - $aBackwardsCompatMethods['GetActiveVaraintValue'] = 'GetActiveVariantValue'; - - if (array_key_exists($name, $aBackwardsCompatMethods)) { - $sNewMethodName = $aBackwardsCompatMethods[$name]; - - return $this->$sNewMethodName(implode(', ', $arguments)); - }" -TShopArticle,"* Mapping of variant type id => variant type values id - * @var array|null $aVariantValueIds","public function getToBasketLinkBasketParameters($bRedirectToBasket = false, $bReplaceBasketContents = false, $bGetAjaxParameter = false, $sMessageConsumer = MTShopBasketCore::MSG_CONSUMER_NAME_MINIBASKET) - { - $oShopConfig = TdbShop::GetInstance(); - $aBasketData = array(); - $aParameters = array(); - if ($bGetAjaxParameter) { - $aModuleFnc = array($oShopConfig->GetBasketModuleSpotName() => 'ExecuteAjaxCall'); - $aParameters['_fnc'] = 'AddToBasketAjax'; - }" -TShopArticle,"* render the variant selection html using the display handler defined through the variant set. - * - * @param string $sViewName - * @param string $sViewType - * - * @return string","public function getToBasketLinkBasketParametersOnly($bIncludePortalLink = false, $bRedirectToBasket = false, $bReplaceBasketContents = false, $bGetAjaxParameter = false, $sMessageConsumer = MTShopBasketCore::MSG_CONSUMER_NAME_MINIBASKET) - { - $aParameters = $this->getToBasketLinkBasketParameters($bRedirectToBasket, $bReplaceBasketContents, $bGetAjaxParameter, $sMessageConsumer); - - return $this->generateLinkForToBasketParameters($aParameters, $bIncludePortalLink); - }" -TShopArticle,"* return the variant matching the shop_variant_type_value paris. - * - * @param array $aTypeValuePairs - * - * @return TdbShopArticle|null - * - * @deprecated since 6.2.13 - replaced by ProductVariantServiceInterface::getProductBasedOnSelection()","public function isActive() - { - return $this->fieldActive && $this->fieldVariantParentIsActive; - }" -TShopArticleCatalogConf,"* Returns the active order by for the given category. - * - * @param TdbShopCategory $oActiveCategory - * - * @return string","public function GetDefaultOrderBy(TdbShopCategory $oActiveCategory) - { - $sDefaultOrderBy = $this->fieldShopModuleArticlelistOrderbyId; - - $bDone = false; - $sActiveCategoryId = $oActiveCategory->id; - - do { - // is there another order by set for this category or any of its parents - $query = ""SELECT `shop_category`.`id`, `shop_category`.`url_path`, `shop_category`.`shop_category_id`, - `shop_article_catalog_conf_default_order`.`shop_module_articlelist_orderby_id` - FROM `shop_category` - LEFT JOIN `shop_article_catalog_conf_default_order_shop_category_mlt` ON `shop_category`.`id` = `shop_article_catalog_conf_default_order_shop_category_mlt`.`target_id` - LEFT JOIN `shop_article_catalog_conf_default_order` ON (`shop_article_catalog_conf_default_order_shop_category_mlt`.`source_id` = `shop_article_catalog_conf_default_order`.`id` AND `shop_article_catalog_conf_default_order`.`shop_article_catalog_conf_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""') - WHERE `shop_category`.`id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sActiveCategoryId).""' - ""; - if ($aCategoryDetails = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { - if (isset($aCategoryDetails['shop_module_articlelist_orderby_id']) && !empty($aCategoryDetails['shop_module_articlelist_orderby_id'])) { - $bDone = true; - $sDefaultOrderBy = $aCategoryDetails['shop_module_articlelist_orderby_id']; - }" -TShopArticleGroup,"* return the vat group of the article group. - * - * @return TdbShopVat|null","public function GetVat() - { - return $this->GetFieldShopVat(); - }" -TShopArticleGroupList,"* return article group list for an article. - * - * @param int $iArticleId - * - * @return TdbShopArticleGroupList","public function GetMaxVat() - { - $iPointer = $this->getItemPointer(); - $oMaxVatItem = null; - $this->GoToStart(); - while ($oItem = $this->Next()) { - $oCurrentVat = $oItem->GetVat(); - if (!is_null($oCurrentVat)) { - if (is_null($oMaxVatItem)) { - $oMaxVatItem = $oCurrentVat; - }" -TShopArticleList,"* identifies the list object with a module spot. - * - * @var string","public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $sViewIdentKey = $this->StoreListObjectInSession($sViewName, $sViewType, $aCallTimeVars); - $this->GoToStart(); - $oView->AddVar('oArticleList', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $oView->AddVar('sViewIdentKey', $sViewIdentKey); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, TdbShopArticleList::VIEW_PATH, $sViewType); - }" -TShopArticleList,"* returns a subquery that can be used to reduce a query set to only active articles. - * - * @param bool $bRestrictToVariantParentArticles - * - * @return string","public function GetListIdentKey() - { - if (null === $this->sListIdentKey) { - $oGlobal = TGlobal::instance(); - $oExecutingModule = $oGlobal->GetExecutingModulePointer(); - $this->sListIdentKey = $oExecutingModule->sModuleSpotName; - }" -TShopArticleList,"* return active article list for the given category id. - * - * @param int $iCategoryId - this may alos be an ARRAY! in that case all articles from any of the listed categories IDs will be returned - * @param string $sOrderString - * @param int $iLimit - * @param array $aFilter - any filters you want to add to the list - * - * @return TdbShopArticleList","public function StoreListObjectInSession($sViewName = null, $sViewType = null, $aCallTimeVars = null) - { - $oGlobal = TGlobal::instance(); - $sItemKey = $this->GetListIdentKey(); - $oExecutingModule = $oGlobal->GetExecutingModulePointer(); - - if (!array_key_exists(TdbShopArticleList::SESSIN_DUMP_NAME, $_SESSION)) { - $_SESSION[TdbShopArticleList::SESSIN_DUMP_NAME] = array(); - }" -TShopArticleList,"* return active article list for the given category id. - * - * @param array $aCategoryIdList - an array of categories - * @param string $sOrderString - * @param int $iLimit - * @param array $aFilter - any filters you want to add to the list - * @param string $sCustomBaseQuery - * - * @return TdbShopArticleList","public function RestorePagingInfoFromSession($iStartRecord, $iPageSize) - { - $identKey = $this->GetListIdentKey(); - $aTmpData = TdbShopArticleList::GetInstanceDataFromSession($identKey); - $bPagingWasRestoredFromSession = false; - if (!is_null($aTmpData)) { - $bPagingWasRestoredFromSession = $this->SetPagingInfo($aTmpData['iStartRecord'], $aTmpData['iPageSize']); - }" -TShopArticleList,"* for some reason, ordering the subquery with a select on only id and then joining that with the full article table is a) super fast and b) results in the correct order - * while select all records right away on the order query is extremely slow (factor 10).","public function GetNextPageLink() - { - $sLink = false; - if ($this->HasNextPage()) { - $oGlobal = TGlobal::instance(); - $oExecutingModule = $oGlobal->GetExecutingModulePointer(); - $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ChangePage', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'NextPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => $this->GetCurrentPageNumber()); - $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks()); - }" -TShopArticleList,"* return active article list. - * - * @param int $iCategoryId - * @param string $sOrderString - * @param int $iLimit - * @param array $aFilter - any filters you want to add to the list - * - * @return TdbShopArticleList","public function GetNextPageLinkAsAJAXCall($bGetAsJSFunction = true) - { - $sLink = false; - if ($this->HasNextPage()) { - $oGlobal = TGlobal::instance(); - $oExecutingModule = $oGlobal->GetExecutingModulePointer(); - $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ExecuteAjaxCall', '_fnc' => 'ChangePageAjax', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'NextPage', - ); - $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks()); - if ($bGetAsJSFunction) { - $sLink = ""GetAjaxCall('{$sLink}" -TShopArticleList,"* used to display the article list. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * - * @return string","public function GetPreviousPageLinkAsAJAXCall($bGetAsJSFunction = true) - { - $sLink = false; - if ($this->HasPreviousPage()) { - $oGlobal = TGlobal::instance(); - $oExecutingModule = $oGlobal->GetExecutingModulePointer(); - $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ExecuteAjaxCall', '_fnc' => 'ChangePageAjax', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'PreviousPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => $this->GetCurrentPageNumber() - 2, - ); - $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks()); - if ($bGetAsJSFunction) { - $sLink = ""GetAjaxCall('{$sLink}" -TShopArticleList,"* return an IdentKey for this list. - * - * @return string","public function GetPreviousPageLink() - { - $sLink = false; - if ($this->HasPreviousPage()) { - $oGlobal = TGlobal::instance(); - $oExecutingModule = $oGlobal->GetExecutingModulePointer(); - $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ChangePage', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'PreviousPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => ($this->GetCurrentPageNumber() - 2)); - $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks()); - }" -TShopArticleList,"* restore serialized dump in session. returns id key for item. also calls - * session cleanup method. - * - * @return string - * - * @param null|string $sViewName - * @param null|string $sViewType - * @param array|null $aCallTimeVars","public function GetPageJumpLinkAsAJAXCall($iPageNumber, $bGetAsJSFunction = true) - { - $sLink = false; - if ($iPageNumber < $this->GetTotalPageCount()) { - $oGlobal = TGlobal::instance(); - $oExecutingModule = $oGlobal->GetExecutingModulePointer(); - $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ExecuteAjaxCall', '_fnc' => 'ChangePageAjax', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'GoToPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => $iPageNumber, - ); - $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks()); - if ($bGetAsJSFunction) { - $sLink = ""GetAjaxCall('{$sLink}" -TShopArticleList,"* return list data for key stored in session. returns NULL if no item or no session is found - * note: the item will be removed from session. - * - * @param string $sListSessionKey - * - * @return array|null","public function GetPageJumpLink($iPageNumber) - { - $sLink = false; - if ($iPageNumber < $this->GetTotalPageCount()) { - $oGlobal = TGlobal::instance(); - $oExecutingModule = $oGlobal->GetExecutingModulePointer(); - $aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'ChangePage', TdbShopArticleList::URL_LIST_KEY_NAME => $this->GetListIdentKey(), TdbShopArticleList::URL_LIST_REQUEST => 'GoToPage', TdbShopArticleList::URL_LIST_CURRENT_PAGE => $iPageNumber); - $sLink = $this->getActivePageService()->getLinkToActivePageRelative($aAdditionalParameters, TdbShopArticleList::GetParametersToIgnoreInPageLinks()); - }" -TShopArticleList,"* create a list based on the session data for the session key passed - * returns NULL if the object can not be found. - * - * @param string $sListSessionKey - * - * @return TdbShopArticleList|null","public function HandleURLRequest($sRequest, $bCheckIdentKey = false) - { - $bAllowRequest = true; - if ($bCheckIdentKey) { - $currentListKey = $this->GetListIdentKey(); - $oGlobal = TGlobal::instance(); - $callingIdentKey = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME); - if ($callingIdentKey != $currentListKey) { - $bAllowRequest = false; - }" -TShopArticlePreviewImage,"* the connected article. - * - * @var TdbShopArticle","public function LoadByName($oArticle, $sInternalName) - { - $bLoaded = false; - $this->oArticle = $oArticle; - $this->oImageSize = TdbShopArticleImageSize::GetNewInstance(); - /** @var $oImageSize TdbShopArticleImageSize */ - if ($this->oImageSize->LoadFromField('name_internal', $sInternalName)) { - if ($this->LoadFromFields(array('shop_article_id' => $oArticle->id, 'shop_article_image_size_id' => $this->oImageSize->id))) { - $bLoaded = true; - }" -TShopArticlePreviewImage,"* the preview image object. - * - * @var TCMSImage","public function Render($sView = 'simple', $type = 'Core', $aEffects = array(), $bHideNewMarker = false) - { - $oView = new TViewParser(); - - $oArticle = $this->GetArticleObject(); - $oArticleSize = $this->GetImageSizeObject(); - $oImage = $this->GetImageObject(); - - $oView->AddVar('oArticle', $oArticle); - $oView->AddVar('oImageSize', $oArticleSize); - $oView->AddVar('oImage', $oImage); - $oView->AddVar('oPreviewImage', $this); - $oView->AddVar('bHideNewMarker', $bHideNewMarker); - $oThumb = $this->GetImageThumbnailObject($aEffects); - $oView->AddVar('oImageThumbnail', $oThumb); - - return $oView->RenderObjectPackageView($sView, self::VIEW_PATH, $type); - }" -TShopArticlePreviewImage,"* the image size of the preview image. - * - * @var TdbShopArticleImageSize","public function GetArticleObject() - { - if (is_null($this->oArticle)) { - $this->oArticle = TdbShopArticle::GetNewInstance(); - if (!$this->oArticle->Load($this->sqlData['shop_article_id'])) { - $this->oArticle = null; - }" -TShopArticlePreviewImage,"* return the image preview object. if the shop did not define one for this size, - * then we create a virtual instance based on the first image of the article. - * - * @param TdbShopArticle $oArticle - the article object - * @param string $sInternalName - image size name - * - * @return bool","public function GetImageObject() - { - if (is_null($this->oImage)) { - $this->oImage = $this->GetImage(0, 'cms_media_id', true); - }" -TShopArticlePreviewImage,@var $oImageSize TdbShopArticleImageSize,"public function GetImageThumbnailObject($aEffects = array()) - { - $oImageSize = $this->GetImageSizeObject(); - $oImage = $this->GetImageObject(); - $oThumb = null; - TdbCmsConfigImagemagick::SetEnableEffects(true); - $bEnableEffects = TdbCmsConfigImagemagick::GetEnableEffects(); - - if ($oImageSize->fieldForceSize) { - $oThumb = $oImage->GetForcedSizeThumbnail($oImageSize->fieldWidth, $oImageSize->fieldHeight); - }" -TShopArticlePreviewImage,@var $oPrimaryImage TdbShopArticleImage,"public function GetImageSizeObject() - { - if (is_null($this->oImageSize)) { - $this->oImageSize = TdbShopArticleImageSize::GetNewInstance(); - if (!$this->oImageSize->Load($this->sqlData['shop_article_image_size_id'])) { - $this->oImageSize = null; - }" -TShopArticleReview,"* return the age of the review as a string. - * - * @return string","public function GetReviewAgeAsString() - { - $iNow = time(); - $dYear = date('Y', $iNow); - $dMonth = date('n', $iNow); - $dDay = date('j', $iNow); - $dHour = date('G', $iNow); - $dMin = date('i', $iNow); - if ('0' == substr($dMin, 0, 1)) { - $dMin = substr($dMin, 1); - }" -TShopArticleReview,"* used to display an article. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * @param bool $bAllowCache - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array(), $bAllowCache = true) - { - $oView = new TViewParser(); - $oView->AddVar('oReview', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopArticleReview,"* @param string $id - * @param array $aCallTimeVars - * - * @return array","public function LoadFromRowProtected($aRow) - { - $whitelist = $this->getFieldWhitelistForLoadByRow(); - $safeData = []; - foreach ($aRow as $key => $val) { - if (\in_array($key, $whitelist, true)) { - $safeData[$key] = $val; - }" -TShopArticleReview,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function SendNewReviewNotification() - { - $oMail = TDataMailProfile::GetProfile('shop-new-review'); - $aData = $this->sqlData; - $oArticle = $this->GetFieldShopArticle(); - $aData['ArtikelName'] = $oArticle->GetName(); - $oMail->AddDataArray($aData); - $oMail->SendUsingObjectView('emails', 'Customer'); - }" -TShopArticleReviewList,"* set to the owning article id, if list is generated via GetPublishedReviews. - * - * @var string","public function GetAverageScore() - { - $dAvgScore = 0; - if ($this->Length() > 0) { - $iPt = $this->getItemPointer(); - $this->GoToStart(); - $dScore = 0; - while ($oitem = $this->Next()) { - $dScore += $oitem->fieldRating; - }" -TShopArticleReviewList,"* return the average score for the review list. - * - * @return float","public function SetOwningArticleId($iArticleId) - { - $this->iArticleId = $iArticleId; - }" -TShopArticleReviewList,"* return all published items. - * - * @param int $iArticle - * @param int $iLanguage - * - * @return TdbShopArticleReviewList","public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array(), $bAllowCache = true) - { - $oView = new TViewParser(); - $oView->AddVar('oReviewList', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $oView->AddVar('iArticleId', $this->iArticleId); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopBundleArticle,"* used to display an article. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oShopBundleArticle', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopBundleArticleList,"* used to display an article. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oShopBundleArticleList', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopCategory,"* return the vat group of the category. - * - * @return TdbShopVat|null","public function GetVat() - { - return $this->GetFieldShopVat(); - }" -TShopCategory,"* returns a link that restricts the current search to the category. - * - * @return string","public function GetSearchRestrictionLink() - { - // get current search... then add filter - $oShop = $this->getShopService()->getActiveShop(); - $oSearchCache = $oShop->GetActiveSearchObject(); - //$oSearchCache->aFilter[TdbShopCategory::FILTER_KEY_NAME] = $this->id; - return $oSearchCache->GetSearchLink(array(TdbShopCategory::FILTER_KEY_NAME => $this->id)); - }" -TShopCategory,"* return the link to the category. note: if the category is connected to a primary navi - * of the shop AND that navi node also has a page attached, then we return the link - * to that page, instead of the link to the category (this allows us to create category entry pages). - * - * @param bool $bAbsolute - set to true if you want to include the domain in the link (absolute link) - * @param string $sAnchor - Anchor to add to the link (Part after #) - * @param array $aOptionalParameters - * @param TdbCmsPortal $portal - * @param TdbCmsLanguage $language - * - * @return string","public function GetLink($bAbsolute = false, $sAnchor = null, $aOptionalParameters = array(), TdbCmsPortal $portal = null, TdbCmsLanguage $language = null) - { - $sInternalCacheKey = 'sLinkToCategory'; - if ($bAbsolute) { - $sInternalCacheKey .= 'WithPortal'; - }" -TShopCategory,"* returns a URL escaped path to the current category. - * - * @return string","public function GetURLPath() - { - return $this->fieldUrlPath; - }" -TShopCategory,"* return an ID list of all child categories (complete depth). - * - * @return array","public function GetAllChildrenIds() - { - $aChildIdList = $this->GetFromInternalCache('aChildIdList'); - if (null !== $aChildIdList) { - return $aChildIdList; - }" -TShopCategory,"* return all children of this category. - * - * @return TdbShopCategoryList","public function GetChildren() - { - return TdbShopCategoryList::GetChildCategories($this->id, null, $this->GetLanguage()); - }" -TShopCategory,"* returns a count of the number of articles in the category. the method caches - * the data since a count is expensive. - * - * @param bool $bIncludeSubcategoriesInCount - * - * @return int","public function GetNumberOfArticlesInCategory($bIncludeSubcategoriesInCount = false) - { - if ($bIncludeSubcategoriesInCount) { - $oArticleList = $this->GetArticleListIncludingSubcategories(); - }" -TShopCategory,"* return article list for current category - * note: the result ist cached in the class instance... - * - * @param string $sOrderBy - * @param array $aFilter - any filter restrictions you want to add (must be filds within the shop table) - * - * @return TdbShopArticleList","public function GetArticleList($sOrderBy = null, $aFilter = array()) - { - $oCategoryArticles = $this->GetFromInternalCache('oArticleList'); - if (is_null($oCategoryArticles)) { - $oCategoryArticles = TdbShopArticleList::LoadCategoryArticleList($this->id, $sOrderBy, -1, $aFilter); - $this->SetInternalCache('oArticleList', $oCategoryArticles); - }" -TShopCategory,"* return article list for current category including articles for all subcategories - * note: the result ist cached in the class instance... - * - * @param string $sOrderBy - * @param array $aFilter - any filter restrictions you want to add (must be filds within the shop table) - * - * @return TdbShopArticleList","public function GetArticleListIncludingSubcategories($sOrderBy = null, $aFilter = array()) - { - $sCacheKey = $this->getCacheKeyForArticleList($sOrderBy, $aFilter); - $oCategoryArticles = $this->GetFromInternalCache($sCacheKey); - if (is_null($oCategoryArticles)) { - $aCategoryIds = $this->GetAllChildrenIds(); - $aCategoryIds[] = $this->id; - $oCategoryArticles = TdbShopArticleList::LoadCategoryArticleListForCategoryList($aCategoryIds, $sOrderBy, -1, $aFilter); - $this->SetInternalCache($sCacheKey, $oCategoryArticles); - }" -TShopCategory,"* @param null|string $sOrderBy - * @param array $aFilter - * - * @return string","public function GetParent() - { - $oParent = null; - if (!empty($this->fieldShopCategoryId)) { - $oParent = TdbShopCategory::GetNewInstance(); - $oParent->SetLanguage($this->iLanguageId); - if (!$oParent->Load($this->fieldShopCategoryId)) { - $oParent = null; - }" -TShopCategory,"* return the parent category, or null if no parent is found. - * - * @return TdbShopCategory|null","public function IsInActivePath() - { - /** @var true|null $bIsInActivePath */ - $bIsInActivePath = $this->GetFromInternalCache('bIsInActivePath'); - if (is_null($bIsInActivePath)) { - $aCatPath = TdbShop::GetActiveCategoryPath(); - if (!is_null($aCatPath) && array_key_exists($this->id, $aCatPath)) { - $bIsInActivePath = true; - }" -TShopCategory,"* returns true if this category is in the active category path (ie is the active - * category, or a parent of the active category). - * - * @return true|null","public function IsInCategoryPath($sCategoryId) - { - $oBreadCrumb = $this->GetBreadcrumb(); - $oMatchingNode = $oBreadCrumb->FindItemWithProperty('id', $sCategoryId); - if ($oMatchingNode) { - return true; - }" -TShopCategory,@var true|null $bIsInActivePath,"public function GetCategoryPathAsString($sSeparator = '/') - { - $sKey = 'sCatPathCache'.$sSeparator; - - $sPath = $this->GetFromInternalCache($sKey); - if (is_null($sPath)) { - $sPath = ''; - $oParent = $this->GetParent(); - if ($oParent) { - $sPath = $oParent->GetCategoryPathAsString($sSeparator); - }" -TShopCategory,"* return true if the category id passed is in the path to this category. - * - * @param string $sCategoryId - * - * @return bool","public function GetRootCategory() - { - /** @var TdbShopCategory|null $oRootCategory */ - $oRootCategory = $this->GetFromInternalCache('oRootCategory'); - - if (is_null($oRootCategory)) { - $oRootCategory = clone $this; - while (!empty($oRootCategory->fieldShopCategoryId)) { - /** @var TdbShopCategory $oRootCategory */ - $oRootCategory = $oRootCategory->GetParent(); - }" -TShopCategory,"* return the category path as a string, each node separated by the sSeparator. - * - * @param string $sSeparator - * - * @return string","public function GetBreadcrumb() - { - $oBreadCrumb = $this->GetFromInternalCache('oCategoryBreadcrumb'); - if (is_null($oBreadCrumb)) { - $oBreadCrumb = TdbShopCategoryList::GetCategoryPath($this->id, null, $this->GetLanguage()); - $this->SetInternalCache('oCategoryBreadcrumb', $oBreadCrumb); - }" -TShopCategory,"* return the currents category root category. - * - * @return TdbShopCategory","public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oCategory', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopCategory,@var TdbShopCategory|null $oRootCategory,"public function GetMetaKeywords() - { - if (strlen(trim(strip_tags($this->fieldMetaKeywords))) > 0) { - $aKeywords = explode(',', trim(strip_tags($this->fieldMetaKeywords))); - }" -TShopCategory,@var TdbShopCategory $oRootCategory,"public function GetMetaDescription() - { - $sDesc = trim($this->fieldMetaDescription); - if (empty($sDesc)) { - $oParent = $this->GetParent(); - if (!is_null($oParent)) { - $sDesc .= $oParent->GetMetaDescription().' '; - }" -TShopCategory,"* return a list of all categories to the current category. - * - * @return TIterator","public function AllowDisplayInShop() - { - if (false === $this->fieldActive || false === $this->fieldTreeActive) { - return false; - }" -TShopCategory,"* used to display an article. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * - * @return string","public function GetSeoPattern(&$sPaternIn) - { - //$sPaternIn = ""[{PORTAL_NAME}" -TShopCategory,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function GetBreadcrumbName() - { - return $this->GetName(); - }" -TShopCategory,"* returns an array with all table names that are relevant for the render function. - * - * @param string $sViewName - the view name being requested (if know by the caller) - * @param string $sViewType - the view type (core, custom-core, customer) being requested (if know by the caller) - * - * @return string[]","public function GetProductNameExtensions() - { - $sName = trim($this->fieldNameProduct); - if (empty($sName)) { - $sName = $this->fieldName; - }" -TShopCategory,"* return keywords for the meta tag on article detail pages. - * - * @return array","public function GetCurrentColorCode($sDefaultColor = '000000') - { - $oRootCat = $this->GetRootCategory(); - /** @var $oRootCat TdbShopCategory */ - $sColorcode = $oRootCat->fieldColorcode; - if ('' == $sColorcode) { - $sColorcode = $sDefaultColor; - }" -TShopCategory,"* return meta description. - * - * @return string","public function getParentCategories() - { - return TdbShopCategoryList::getParentCategoryList($this->id); - }" -TShopCategory,"* Hook for implementing category display logic. - * - * @return bool","public function parentCategoriesAreActive() - { - $treeIsActive = true; - $parentCategoryList = $this->getParentCategories(); - while ($category = $parentCategoryList->Next()) { - if (false === $category->fieldActive) { - $treeIsActive = false; - break; - }" -TShopCategory,"* Get SEO pattern of actual article. - * - * @param string $sPaternIn - * - * @return array","public function getTargetPage() - { - static $defaultPage = null; // since most categories will have the same default page, we store a static copy for performance - $targetPage = $this->GetFromInternalCache('target_page'); - if (null !== $targetPage) { - return $targetPage; - }" -TShopCategoryList,"* return all categories connected to the article - * Add main category from article to list on first position. - * - * @param int $iArticleId - * @param string $sLanguageID - * - * @return TdbShopCategoryList","public function GetMaxVat() - { - $iPointer = $this->getItemPointer(); - $oMaxVatItem = null; - $this->GoToStart(); - while ($oItem = $this->Next()) { - $oCurrentVat = $oItem->GetVat(); - if (!is_null($oCurrentVat)) { - if (is_null($oMaxVatItem)) { - $oMaxVatItem = $oCurrentVat; - }" -TShopCategoryList,"* return root category list. - * - * @param string|null $sLanguageID - * - * @return TdbShopCategoryList","public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oCategoryList', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, TdbShopCategoryList::VIEW_PATH, $sViewType); - }" -TShopContributorList,"* used to display an article. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - - // add view variables - $oView->AddVar('oContributorList', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopDiscount,"* constants below define the status returned when checking if a discount can be - * used in the current basket.","public function IsActive() - { - $sToday = date('Y-m-d H:i:s'); - $bIsActive = ($this->fieldActive && ($this->fieldActiveFrom <= $sToday && ($this->fieldActiveTo >= $sToday || '0000-00-00 00:00:00' == $this->fieldActiveTo))); - - return $bIsActive; - }" -TShopDiscount,* discount may be used.,"public function AllowUseOfDiscount($iCheckFlag = 0) - { - $bAllowUse = TdbShopDiscount::ALLOW_USE; - - $oBasket = TShopBasket::GetInstance(); - $oUser = TdbDataExtranetUser::GetInstance(); - - // check if the series is active - if (!$this->IsActive()) { - $bAllowUse = TdbShopDiscount::USE_ERROR_DISCOUNT_INACTIVE; - }" -TShopDiscount,* the discount is not active (respects both the boolean field and the date fields).,"public function GetValue() - { - $dValue = $this->fieldValue; - $oBasket = TShopBasket::GetInstance(); - $dBasketValueApplicableForDiscount = $oBasket->GetBasketSumForDiscount($this); - $dValue = $this->GetValueForBasketValue($dBasketValueApplicableForDiscount); - - return $dValue; - }" -TShopDiscount,* the basket value is below the minimum value specified for the voucher series.,"public function GetValueForBasketValue($dBasketValueApplicableForDiscount) - { - $dValue = $this->fieldValue; - $oBasket = TShopBasket::GetInstance(); - if ('prozent' == $this->fieldValueType) { - $dValue = round($dBasketValueApplicableForDiscount * ($dValue / 100), 2); - }" -TShopDiscount,"* the discount has been restricted to a set of customers, and the current customer is not in that list.","public function AllowDiscountForArticle(TdbShopArticle $oArticle) - { - $bMayBeUsed = true; - if ($oArticle->fieldExcludeFromDiscounts) { - $bMayBeUsed = false; - }" -TShopDiscount,"* the discount has been restricted to a set of customer groups, none of which the current customer is in.","public function AllowDiscountForUser($oUser) - { - $bIsValid = $this->AllowDiscountForNonUsers(); - if (!$bIsValid && $oUser) { - $bIsValid = true; - $aExtranetGroup = $this->GetFieldDataExtranetGroupWithInverseEmptySelectionLogicIdList(); - if (null === $aExtranetGroup) { - $bIsValid = false; - }" -TShopDiscount,* the discount may not be used for the shipping country selected by the user.,"public function AllowDiscountForNonUsers() - { - $bIsValid = true; - $aExtranetGroup = $this->GetFieldDataExtranetGroupWithInverseEmptySelectionLogicIdList(); - if (null === $aExtranetGroup || count($aExtranetGroup) > 0) { - $bIsValid = false; - }" -TShopDiscount,* flags can be used to enable/disable checks when calling AllowUseOfDiscount.,"public function HasBasketRestrictions() - { - $bRestrictedToBasket = (($this->fieldRestrictToArticlesFrom > 0) || ($this->fieldRestrictToArticlesTo > 0) || ($this->fieldRestrictToValueFrom > 0) || ($this->fieldRestrictToValueTo > 0)); - - return $bRestrictedToBasket; - }" -TShopDiscount,"* the real value of the discount used for an article. this value - * is set from the controlling TShopBasketArticle. - * - * @var float","public function HasBasketContentRestrictions() - { - $bHasArticleRestriction = $this->GetFromInternalCache('bHasArticleRestriction'); - if (is_null($bHasArticleRestriction)) { - $aCategoryRestrictons = $this->GetMLTIdList('shop_category_mlt'); - $bHasArticleRestriction = (count($aCategoryRestrictons) > 0); - if (!$bHasArticleRestriction) { - $aArticleRestrictons = $this->GetMLTIdList('shop_article_mlt'); - $bHasArticleRestriction = (count($aArticleRestrictons) > 0); - }" -TShopDiscount,"* return true if the discount is active. - * - * @return bool","public function ClearCacheOnAllAffectedArticles() - { - $iStartOperation = time(); - $aArticleRestrictions = $this->GetMLTIdList('shop_article_mlt'); - foreach ($aArticleRestrictions as $sArticelId) { - TCacheManager::PerformeTableChange('shop_article', $sArticelId); - }" -TShopManufacturer,"* return link to the product pages for the manufacturer. - * - * @param bool $bUseAbsoluteURL - * - * @return string","public function GetLinkProducts($bUseAbsoluteURL = false) - { - $oShop = TdbShop::GetInstance(); - $sLink = $oShop->GetLinkToSystemPage('manufacturer'); - if ('.html' == substr($sLink, -5)) { - $sLink = substr($sLink, 0, -5).'/'; - }" -TShopManufacturer,"* returns a link that restricts the current search to the category. - * - * @return string","public function GetSearchRestrictionLink() - { - // get current search... then add filter - $oShop = TdbShop::GetInstance(); - $oSearchCache = $oShop->GetActiveSearchObject(); - //$oSearchCache->aFilter[TdbShopManufacturer::FILTER_KEY_NAME] = $this->id; - return $oSearchCache->GetSearchLink(array(TdbShopManufacturer::FILTER_KEY_NAME => $this->id)); - }" -TShopManufacturer,"* return an instance for the current filter (if the filter defines a manufacturer) - * null if it does not. - * - * @return TdbShopManufacturer|null","public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oManufacturer', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, TdbShopManufacturer::VIEW_PATH, $sViewType); - }" -TShopManufacturer,@var $oInstance TdbShopManufacturer,"public function GetNumberOfHitsForSearchCacheId($iShopSearchCacheId, $bApplyActiveFilter = false) - { - $iNumHits = 0; - - if ($bApplyActiveFilter) { - $query = ""SELECT COUNT(DISTINCT `shop_search_cache_item`.`id`) AS hits - FROM `shop_search_cache_item` - INNER JOIN `shop_article` ON `shop_search_cache_item`.`shop_article_id` = `shop_article`.`id` - LEFT JOIN `shop_article_shop_category_mlt` ON `shop_article`.`id` = `shop_article_shop_category_mlt`.`source_id` - WHERE `shop_search_cache_item`.`shop_search_cache_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($iShopSearchCacheId).""' - AND `shop_article`.`shop_manufacturer_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' - ""; - $sFilter = TdbShop::GetActiveFilterString(TdbShopManufacturer::FILTER_KEY_NAME); - if (!empty($sFilter)) { - $query .= "" AND {$sFilter}" -TShopManufacturer,"* used to display the manufacturer. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * - * @return string","public function GetIcon($bReturnDefaultImageIfNoneSet = false) - { - /** @var TCMSImage|null $oIcon */ - $oIcon = $this->GetFromInternalCache('oIcon'); - if (is_null($oIcon)) { - $oIcon = $this->GetImage(0, 'cms_media_id', $bReturnDefaultImageIfNoneSet); - if (is_null($oIcon)) { - $oIcon = false; - }" -TShopManufacturer,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function GetLogo($bReturnDefaultImageIfNoneSet = false) - { - /** @var TCMSImage|null $oLogo */ - $oLogo = $this->GetFromInternalCache('oLogo'); - if (is_null($oLogo)) { - $oLogo = $this->GetImage(1, 'cms_media_id', $bReturnDefaultImageIfNoneSet); - if (is_null($oLogo)) { - $oLogo = $this->GetIcon($bReturnDefaultImageIfNoneSet); - }" -TShopManufacturerList,"* @param string $sQuery - * @param array $queryParameters - PDO style parameters - * @param array $queryParameterTypes - PDO style parameter types - * - * @return void - * @psalm-suppress AssignmentToVoid, InvalidReturnStatement - * @FIXME Saving the result of `parent::DeleteExecute()` and returning does not make sense for a `void` return","public function Load($sQuery, array $queryParameters = array(), array $queryParameterTypes = array()) - { - $returnValue = parent::Load($sQuery, $queryParameters, $queryParameterTypes); - if (!TGlobal::IsCMSMode()) { - $this->AddFilterString('`shop_manufacturer`.`active`=""1""'); - }" -TShopModuleArticleList,"* set a new order by id - we need to do this using a method so that we can - * reset the internal cache for the connected lookup. - * - * @param string $iId - * - * @return void","public function UpdateOrderById($iId) - { - $this->sqlData['shop_module_articlelist_orderby_id'] = $iId; - $this->fieldShopModuleArticlelistOrderbyId = $iId; - $oItem = null; - $this->SetInternalCache('oLookupshop_module_articlelist_orderby_id', $oItem); - }" -TShopModuleArticlelistOrderby,"* return order by string. - * - * @param string $sDirection - ASC or DESC. if set to NULL the value set in the class will be used - * - * @return string","public function GetOrderByString($sDirection = null) - { - if (is_null($sDirection)) { - $sDirection = $this->fieldOrderDirection; - }" -TShopModuleArticlelistOrderbyList,"* return list for a set of ids. - * - * @param array $aIdList - * @param int $iLanguageId - * - * @return TdbShopModuleArticlelistOrderbyList","public function Render($iActiveId, $sFormName, $sFieldName, $sViewName = 'changeorder', $sViewType = 'Core', $aCallTimeVars = array(), $bAllowCache = true) - { - $oView = new TViewParser(); - $oView->AddVar('oList', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $oView->AddVar('iActiveId', $iActiveId); - $oView->AddVar('sFormName', $sFormName); - $oView->AddVar('sFieldName', $sFieldName); - - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - $sHTML = $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - - $sActivePageUrl = $this->getActivePageService()->getLinkToActivePageRelative(array(), array('module_fnc', 'listkey', 'listrequest', 'listpage')); - $stringReplacer = new TPkgCmsStringUtilities_VariableInjection(); - - return $stringReplacer->replace($sHTML, ['sActivePageUrl' => $sActivePageUrl]); - }" -TShopOrder,"* we use the post insert hook to set the ordernumber for the order. - * - * @return void","public function LoadFromBasket(TShopBasket $oBasket) - { - $oShop = TdbShop::GetInstance(); - $oPortal = $this->getPortalDomainService()->getActivePortal(); - $oUser = TdbDataExtranetUser::GetInstance(); - $oBillingAdr = $oUser->GetBillingAddress(); - - $sAffiliateCode = $oShop->GetAffilateCode(); - if (false === $sAffiliateCode) { - $sAffiliateCode = ''; - }" -TShopOrder,"* fill the order object with data from the basket - * NOTE: this fills the base order only. None of the lists (article, vat, etc) will be added yet. - * - * @param TShopBasket $oBasket - * - * @return void","public function SaveCustomDataFromBasket(TShopBasket $oBasket) - { - }" -TShopOrder,"* method can be used to modify the data saved to order before the save is executed. - * - * @param TShopBasket $oBasket - * @param array $aOrderData - * - * @return void","public function SaveVouchers(TShopBasketVoucherList $oBasketVoucherList) - { - if (!is_null($this->id) && !is_null($oBasketVoucherList) && $oBasketVoucherList->Length() > 0) { - $oBasketVoucherList->GoToStart(); - while ($oVoucherItemUsed = $oBasketVoucherList->Next()) { - $oVoucherItemUsed->CommitVoucherUseForCurrentUser($this->id); - }" -TShopOrder,"* method can be used to save any custom data to the order. The method is called - * after all core data has been saved to the order (but before the order is marked as complete). - * - * @param TShopBasket $oBasket - * - * @return void","public function SaveArticles(TShopBasketArticleList $oBasketArticleList) - { - if (!is_null($this->id)) { - $oBasketArticleList->GoToStart(); - while ($oBasketItem = $oBasketArticleList->Next()) { - $this->SaveArticle($oBasketItem); - }" -TShopOrder,"* Saves the vouchers passed to the order to the shop_voucher_use table - * Note: this will only work if the order has an id. - * Also Note: existing voucher uses will NOT be removed. - * - * @param TShopBasketVoucherList $oBasketVoucherList - * - * @return void","public function SaveVATList(TdbShopVatList $oVatList) - { - // TODO - if (!is_null($this->id)) { - while ($oVat = $oVatList->Next()) { - $oOrderVat = TdbShopOrderVat::GetNewInstance(); - /** @var $oOrderVat TdbShopOrderVat */ - $aVatData = array('shop_order_id' => $this->id, 'name' => $oVat->GetName(), 'vat_percent' => $oVat->fieldVatPercent, 'value' => $oVat->GetVatValue()); - $oOrderVat->LoadFromRow($aVatData); - $oOrderVat->AllowEditByAll(true); - $oOrderVat->Save(); - }" -TShopOrder,"* save basket articles to order. NOTE: the order object must have an id for - * this method to work. - * - * @param TShopBasketArticleList $oBasketArticleList - * - * @return void","public function SaveShippingUserData(TdbShopShippingGroup $oShippingGroup) - { - // TODO - if (!is_null($this->id)) { - }" -TShopOrder,"* store one article with order. - * - * @param TShopBasketArticle $oBasketItem - * - * @return TdbShopOrderItem","public function SavePaymentUserData(TdbShopPaymentMethod $oPaymentMethod) - { - if (!is_null($this->id)) { - $oHandler = $oPaymentMethod->GetFieldShopPaymentHandler(); - if (!is_null($oHandler)) { - $oHandler->SaveUserPaymentDataToOrder($this->id); - }" -TShopOrder,@var $oOrderItem TdbShopOrderItem,"public function GetPaymentHandler() - { - $oPaymentHandler = $this->GetFromInternalCache('oOrderPaymentHandler'); - if (is_null($oPaymentHandler)) { - $oPaymentMethod = $this->GetFieldShopPaymentMethod(); - if ($oPaymentMethod) { - $aParameter = array(); - $oPaymentParameterList = $this->GetFieldShopOrderPaymentMethodParameterList(); - while ($oParam = $oPaymentParameterList->Next()) { - $aParameter[$oParam->fieldName] = $oParam->fieldValue; - }" -TShopOrder,"* use this method to make changes to the order item data before it is saved to the database. - * - * @param TShopBasketArticle $oBasketItem - * @param array $aOrderItemData - * - * @return void","public function CreateOrderInDatabaseCompleteHook() - { - $aData = $this->sqlData; - $aData['system_order_save_completed'] = '1'; - $this->LoadFromRow($aData); - $bAllowEdit = $this->bAllowEditByAll; - $this->AllowEditByAll(true); - $this->Save(); - $this->AllowEditByAll($bAllowEdit); - - // update auto groups - $oTmpuser = null; - if (!empty($this->fieldDataExtranetUserId)) { - $oTmpuser = $this->GetFieldDataExtranetUser(); - if (!is_null($oTmpuser)) { - TdbDataExtranetGroup::UpdateAutoAssignToUser($oTmpuser); - }" -TShopOrder,"* save an article (pointed to by $oBundleArticle) belonging to a bundle ($oBasketItem) within the order. - * - * @param TShopBasketArticle $oBasketItem - the original basket item - * @param TdbShopOrderItem $oOrderItem - the generated order item (ie the bundle owner) - * @param TdbShopBundleArticle $oBundleArticle - the bundle connection between the owning item and the owned item - * - * @return void","public function ExportOrderForWaWiHook($oPaymentHandler) - { - return true; - }" -TShopOrder,@var $oVirtualBasketArticleForBundle TShopBasketArticle,"public function MarkOrderAsExportedToWaWi($bExported = true) - { - if ($bExported) { - $sDate = date('Y-m-d H:i:s'); - }" -TShopOrder,@var $oBundleConnection TdbShopOrderBundleArticle,"public function SendOrderNotification($sSendToMail = null, $sSendToName = null) - { - $orderNotificationBeforeSendStatus = $this->fieldSystemOrderNotificationSend; - $this->updateSendOrderNotificationState(true); - - if (is_null($sSendToMail)) { - $sSendToMail = $this->fieldUserEmail; - }" -TShopOrder,"* save vat list to basket. NOTE: the order object must have an id for - * this method to work. - * - * @param TdbShopVatList $oVatList - * - * @return void","public function ExecutePayment($oPaymentHandler, $sMessageConsumer = '') - { - $bPaymentOk = false; - $bAllowEdit = $this->bAllowEditByAll; - $this->AllowEditByAll(true); - $aData = $this->sqlData; - $aData['system_order_payment_method_executed'] = '0'; - $aData['system_order_payment_method_executed_date'] = date('Y-m-d H:i:s'); - $this->LoadFromRow($aData); - $this->Save(); - - $bPaymentOk = $this->ExecutePaymentHook($oPaymentHandler, $sMessageConsumer); - - $this->AllowEditByAll($bAllowEdit); - - return $bPaymentOk; - }" -TShopOrder,@var $oOrderVat TdbShopOrderVat,"public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oOrder', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopOrder,"* save any user data for the shipping group in the basket - * NOTE: the order object must have an id for this method to work. - * - * @param TdbShopShippingGroup $oShippingGroup - * - * @return void","public function GetNetProductValue() - { - $dProductNetValue = 0; - $oArticles = $this->GetFieldShopOrderItemList(); - $oArticles->GoToStart(); - $aTaxValueGroups = array(); - while ($oArticle = $oArticles->Next()) { - if (!array_key_exists($oArticle->fieldVatPercent, $aTaxValueGroups)) { - /** - * @psalm-suppress InvalidArrayOffset - * @FIXME Float array keys are converted to integers - this could lead to unwanted behaviour - */ - $aTaxValueGroups[$oArticle->fieldVatPercent] = 0; - }" -TShopOrder,"* save any user data for the payment method in the basket - * NOTE: the order object must have an id for this method to work. - * - * @param TdbShopPaymentMethod $oPaymentMethod - * - * @return void","public function SetStatusPaid($bIsPaid = true) - { - if ($this->fieldOrderIsPaid != $bIsPaid) { - $sDate = ''; - if ($bIsPaid) { - $sDate = date('Y-m-d H:i:s'); - }" -TShopOrder,"* return the payment handler for the order - the handler is initialized - * with the payment data from the order object. - * - * @return TdbShopPaymentHandler|null","public function SetStatusCanceled($bIsCanceled = true) - { - if ($this->fieldCanceled != $bIsCanceled) { - $sDate = ''; - if ($bIsCanceled) { - $sDate = date('Y-m-d H:i:s'); - }" -TShopOrder,* @return ShopPaymentHandlerFactoryInterface,"public function UpdateUsedVouchers($bIsCanceled) - { - $oShopVoucherUseList = $this->GetFieldShopVoucherUseList(); - $oShopVoucherUseList->GoToStart(); - if ($bIsCanceled) { - while ($oShopVoucherUse = $oShopVoucherUseList->Next()) { - $oShopVoucher = $oShopVoucherUse->GetFieldShopVoucher(); - if ($oShopVoucher->fieldIsUsedUp) { - $oShopVoucher->sqlData['is_used_up'] = '0'; - $oShopVoucher->sqlData['date_used_up'] = ''; - $oShopVoucher->fieldIsUsedUp = false; - $oShopVoucher->fieldDateUsedUp = ''; - $oShopVoucher->Save(); - }" -TShopOrder,"* method is called after all data from the basket has been saved to the order tables. - * - * @return void","public function UpdateStock($bRemoveFromStock) - { - $oOrderItemList = $this->GetFieldShopOrderItemList(); - $oOrderItemList->GoToStart(); - while ($oOrderItem = $oOrderItemList->Next()) { - $oItem = $oOrderItem->GetFieldShopArticle(); - if ($oItem) { - $dAmount = $oOrderItem->fieldOrderAmount; - if ($bRemoveFromStock) { - $dAmount = -1 * $dAmount; - }" -TShopOrder,"* Hook used to export order for WaWi (called by TShopBasket after creating the order object) - * return true if the export worked. false if it did not. - * - * @param TdbShopPaymentHandler $oPaymentHandler - the payment handler for the order. this is passed via parameter since - * some payment handler do not save their data in the order (such as credit card) - * - * @return bool","public function PrePaymentExecuteHook($sMessageConsumer) - { - /** - * call external api and if call fails add an error message - * $oMsgManager = TCMSMessageManager::GetInstance(); - * $oMsgManager->AddMessage($sMessageConsumer, 'ERROR-ORDER-SAVE-VIA-API-RETURNED-ERROR');. - */ - - return true; - }" -TShopOrder,"* @param bool $bExported - * - * @return void","public function SaveDiscounts($oShopBasketDiscountList = null) - { - if (!is_null($this->id) && !is_null($oShopBasketDiscountList) && $oShopBasketDiscountList->Length() > 0) { - $oShopBasketDiscountList->GoToStart(); - while ($oShopBasketDiscount = $oShopBasketDiscountList->Next()) { - //save... - $oShopOrderDiscount = TdbShopOrderDiscount::GetNewInstance(); - /** @var $oShopOrderDiscount TdbShopOrderDiscount */ - $aConnectionData = array( - 'shop_order_id' => $this->id, - 'shop_discount_id' => $oShopBasketDiscount->id, - 'name' => $oShopBasketDiscount->fieldName, - 'value' => $oShopBasketDiscount->fieldValueFormated, - 'valuetype' => $oShopBasketDiscount->fieldValueType, - 'total' => $oShopBasketDiscount->GetValue(), - ); - $aConnectionData = $this->saveDiscountsEnrichDiscountSaveData($this, $oShopBasketDiscount, $aConnectionData); - - $oShopOrderDiscount->LoadFromRow($aConnectionData); - $oShopOrderDiscount->AllowEditByAll(true); - $oShopOrderDiscount->Save(); - }" -TShopOrderBundleArticle,"* used to display an article. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oShopOrderBundleArticle', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopOrderBundleArticleList,"* used to display an article. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oShopOrderBundleArticleList', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopOrderItem,"* loads the owning bundle order item IF this item belongs to a bundle. returns false if it is not. - * - * @return TdbShopOrderItem|false","public function GetOwningBundleOrderItem() - { - /** @var TdbShopOrderItem|null $oOwningOrderItem */ - $oOwningOrderItem = $this->GetFromInternalCache('oOwningOrderItem'); - - if (is_null($oOwningOrderItem)) { - $oOwningOrderItem = false; - if (!is_null($this->id)) { - $query = ""SELECT `shop_order_item`.* - FROM `shop_order_item` - INNER JOIN `shop_order_bundle_article` ON `shop_order_item`.`id` = `shop_order_bundle_article`.`shop_order_item_id` - WHERE `shop_order_bundle_article`.`bundle_article_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' - ""; - if ($aOwner = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { - $oOwningOrderItem = TdbShopOrderItem::GetNewInstance(); - /** @var $oOwningOrderItem TdbShopOrderItem */ - $oOwningOrderItem->LoadFromRow($aOwner); - }" -TShopOrderItem,@var TdbShopOrderItem|null $oOwningOrderItem,"public function GetOwningBundleConnection() - { - /** @var TdbShopOrderBundleArticle|null $oOwningBundleConnection */ - $oOwningBundleConnection = $this->GetFromInternalCache('oOwningBundleConnection'); - - if (is_null($oOwningBundleConnection)) { - $oOwningBundleConnection = false; - if (!is_null($this->id)) { - $oOwningBundleConnection = TdbShopOrderBundleArticle::GetNewInstance(); - /** @var $oOwningOrderItem TdbShopOrderBundleArticle */ - if (!$oOwningBundleConnection->LoadFromField('bundle_article_id', $this->id)) { - $oOwningBundleConnection = false; - }" -TShopOrderItem,@var $oOwningOrderItem TdbShopOrderItem,"public function BelongsToABundle() - { - return false !== $this->GetOwningBundleConnection(); - }" -TShopOrderItem,"* if this order item belongs to a bundle, then this method will return the connecting table. - * - * @return TdbShopOrderBundleArticle|false","public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oOrderItem', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopOrderItem,@var TdbShopOrderBundleArticle|null $oOwningBundleConnection,"public function isDownload() - { - $db = \ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection'); - $query = 'select COUNT(*) AS matches FROM `shop_order_item_download_cms_document_mlt` - WHERE `source_id` = :shopOrderItemId'; - $result = $db->fetchAssociative($query, array('shopOrderItemId' => $this->id)); - - return intval($result['matches']) > 0; - }" -TShopOrderStatus,"* retun the status text. - * - * @param bool $bPrepareTextForRemoteUsage - * - * @return string","public function GetStatusText($bPrepareTextForRemoteUsage = false) - { - $sHTML = ''; - $oOrder = $this->GetFieldShopOrder(); - $oCode = $this->GetFieldShopOrderStatusCode(); - $aData = $oOrder->GetSQLWithTablePrefix(); - $aTmpData = $this->GetSQLWithTablePrefix(); - $aData = array_merge($aData, $aTmpData); - $aData['data'] = $this->fieldData; - if ($bPrepareTextForRemoteUsage) { - $sHTML .= $oCode->GetTextForExternalUsage('info_text', 600, true, $aData); - }" -TShopPaymentMethod,"* represents a payment method the user can choose from. it uses a payment handler to gather payment infos - * and execute the payment. -/*","public function GetName() - { - $sName = parent::GetName(); - if (!TGlobal::IsCMSMode()) { - $dCosts = $this->GetPrice(); - if (0 != $dCosts) { - $oLocal = TCMSLocal::GetActive(); - $sName .= ' ('.$oLocal->FormatNumber($dCosts, 2).' EUR)'; - }" -TShopPaymentMethod,* @var float|null,"public function postSelectPaymentHook(TdbShop $oShop, TShopBasket $oBasket, TdbDataExtranetUser $oUser, $sMessageConsumer) - { - return $this->GetFieldShopPaymentHandler()->PostSelectPaymentHook($sMessageConsumer); - }" -TShopPaymentMethod,"* payment handler. - * - * @var TdbShopPaymentHandler","public function GetFieldShopPaymentHandler() - { - if (is_null($this->oPaymentHandler)) { - if (empty($this->fieldShopPaymentHandlerId)) { - return $this->oPaymentHandler; - }" -TShopPaymentMethod,"* we need this information to unserialize the payment handler. - * - * @var array","public function IsAvailable() - { - $bIsValid = true; - $bIsValid = ($bIsValid && $this->IsActive()); - if (!$bIsValid) { - return $bIsValid; - }" -TShopPaymentMethod,"* called after the payment method is selected - return false the selection is invalid. - * - * @param TdbShop $oShop - * @param TShopBasket $oBasket - * @param TdbDataExtranetUser $oUser - * @param string $sMessageConsumer - * - * @return bool","public function IsPublic() - { - $bIsPublic = true; - - if (!$this->IsActive()) { - $bIsPublic = false; - }" -TShopPaymentMethod,"* Paymenthandler. - * - * @return TdbShopPaymentHandler|null","public function IsActive() - { - $bIsActive = false; - if ($this->fieldActive) { - $bIsActive = true; - }" -TShopPaymentMethod,"* return true if this shipping type is valid for the current user / basket. - * - * @return bool","public function IsValidForCurrentUser() - { - $bIsValidForUser = false; - $bIsValidShippingCountry = false; - $bIsValidBillingCountry = false; - - $oUser = TdbDataExtranetUser::GetInstance(); - $bIsValidGroup = $this->checkUserGroup($oUser); - if ($bIsValidGroup) { - $bIsValidForUser = $this->checkUser($oUser); - }" -TShopPaymentMethod,"* returns true if the payment method has no user or user group restriction. - * - * @return bool","public function IsValidForBasket() - { - $bValidForBasket = false; - - $oBasket = TShopBasket::GetInstance(); - - if (false === $oBasket->isTotalCostKnown()) { - // check the total basket value - if ($this->fieldRestrictToBasketValueFrom > $oBasket->dCostTotal || ($this->fieldRestrictToBasketValueTo > 0 && $this->fieldRestrictToBasketValueTo < $oBasket->dCostTotal)) { - return false; - }" -TShopPaymentMethod,"* returns true if the payment method is marked as active for the current time. - * - * @return bool","public function GetPrice() - { - if (is_null($this->dPrice)) { - $this->dPrice = 0; - $oBasket = TShopBasket::GetInstance(); - if ('absolut' == $this->fieldValueType) { - $this->dPrice = $this->fieldValue; - }" -TShopPaymentMethod,"* return true if the payment method is allowed for the current user. - * - * @return bool","public function GetVat() - { - /** @var TdbShopVat|null $oVat */ - $oVat = $this->GetFromInternalCache('ovat'); - - if (is_null($oVat)) { - $oVat = $this->GetFieldShopVat(); - if (is_null($oVat)) { - $oShopConf = TdbShop::GetInstance(); - $oVat = $oShopConf->GetVat(); - }" -TShopPaymentMethod,"* check user group. - * - * @param TdbDataExtranetUser $oUser - * - * @return bool","public function Render($sViewName = 'user-input', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - - // add view variables - $oShop = TdbShop::GetInstance(); - $oView->AddVar('oShop', $oShop); - $oView->AddVar('oPaymentMethod', $this); - - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopPaymentMethod,"* now check user id. - * - * @param TdbDataExtranetUser $oUser - * - * @return bool","public function PostProcessExternalPaymentHandlerHook() - { - return $this->GetFieldShopPaymentHandler()->PostProcessExternalPaymentHandlerHook(); - }" -TShopPaymentMethod,"* check shipping country. - * - * @param TdbDataExtranetUser $oUser - * - * @return bool","public function renderConfirmOrderBlock(TdbDataExtranetUser $user) - { - if (false === $this->GetFieldShopPaymentHandler() instanceof IPkgShopPaymentHandlerCustomConfirmOrderBlockInterface) { - return ''; - }" -TShopPaymentMethod,* @return PaymentMethodDataAccessInterface,"public function processConfirmOrderUserResponse(TdbDataExtranetUser $user, $userData) - { - if (false === $this->GetFieldShopPaymentHandler() instanceof IPkgShopPaymentHandlerCustomConfirmOrderBlockInterface) { - return true; - }" -TShopPaymentMethodList,* @var float|null,"public function RemoveInvalidItems() - { - // since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them - $aValidIds = array(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - if ($oItem->IsAvailable()) { - $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id); - }" -TShopPaymentMethodList,"* return list of shipping types that match the given group, the current basket, - * the current portal and the current user. - * - * @param int $iGroupId - * - * @return TdbShopPaymentMethodList","public function RemoveRestrictedItems() - { - // since this is a tcmsrecord list, we need to collect all valid ids, and then reload the list with them - $aValidIds = array(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - if ($oItem->IsPublic()) { - $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id); - }" -TShopPaymentMethodList,"* @param string $paymentGroupId - * - * @return string","public function GetTotalPrice() - { - if (is_null($this->dPrice)) { - $this->dPrice = 0; - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - $this->dPrice += $oItem->GetPrice(); - }" -TShopShippingGroup,"* shipping costs are grouped into shipping groups. these groups hold the allowed payment methods, and they - * can be restricted to certain users, user groups, or delivery countries. -/*","public function __sleep() - { - return array('table', 'id', 'iLanguageId'); - }" -TShopShippingGroup,* @var TdbShopShippingTypeList,"public function __wakeup() - { - $this->Load($this->id); - if (method_exists('TShopShippingGroupAutoParent', '__wakeup')) { - parent::__wakeup(); - }" -TShopShippingGroup,"* a list of all payment methods valid for the group (and the current user/basket). - * - * @var TdbShopPaymentMethodList","public function GetName() - { - $sName = parent::GetName(); - if (!TGlobal::IsCMSMode()) { - $dCosts = $this->GetShippingCostsForBasket(); - if (0 != $dCosts) { - $oLocal = TCMSLocal::GetActive(); - $sCurrencySymbol = $this->GetCurrencySymbol(); - $sName .= ' ('.$oLocal->FormatNumber($dCosts, 2).' '.$sCurrencySymbol.')'; - }" -TShopShippingGroup,* @var float|null,"public function isAvailableIgnoreGroupRestriction() - { - $bIsValid = true; - - $bIsValid = ($bIsValid && $this->IsActive()); - $bIsValid = ($bIsValid && $this->isValidForCurrentPortal()); - $bIsValid = ($bIsValid && $this->IsValidForCurrentUser()); - $bIsValid = ($bIsValid && $this->HasAvailableShippingTypes()); - $bIsValid = ($bIsValid && $this->HasAvailablePaymentMethods()); - - if ($bIsValid && false === $this->hasShippingTypeThatStopsTypeChain()) { - $oBasket = TShopBasket::GetInstance(); - //check to make sure that every item in the basket has one shipping type - $oBasketItemList = $oBasket->GetBasketContents(); - $oBasketItemList->GoToStart(); - while ($bIsValid && ($oBasketItem = $oBasketItemList->Next())) { - if (null === $oBasketItem->GetActingShippingType()) { - $bIsValid = false; - }" -TShopShippingGroup,"* returns currency symbol (by default €). - * - * @return string","public function IsAvailable() - { - $bIsValid = $this->isAvailableIgnoreGroupRestriction(); - - if ($bIsValid) { - // check group restrictions - $aShippingGroupIdList = array(); - $oShippingGroup = TShopBasket::GetInstance()->GetAvailableShippingGroups(); - if (null !== $oShippingGroup) { - $aShippingGroupIdList = $oShippingGroup->GetIdList(); - }" -TShopShippingGroup,"* returns true if the shipping cost group may be used for the current user / basket. - * - * @return bool","public function allowedForShippingGroupList($aShippingGroupIdList) - { - $bValid = true; - - // get list of all groups that will exclude this shipping group from the valid list - // this group is not valid if one of the restricted groups is found in the given shipping group list ($aShippingGroupIdList) - $aRestrictionGroupIdList = $this->GetFieldShopShippingGroupIdList(); - foreach ($aRestrictionGroupIdList as $sRestrictionGroupId) { - if (in_array($sRestrictionGroupId, $aShippingGroupIdList)) { - $bValid = false; - }" -TShopShippingGroup,* @return bool,"public function IsPublic() - { - $bIsPublic = true; - - if (!$this->IsActive()) { - $bIsPublic = false; - }" -TShopShippingGroup,"* returns true if the shipping cost group may be used for the current user / basket - * also checks if the group is invalid due to a restriction to other shipping groups. - * - * @return bool","public function IsActive() - { - $bIsActive = false; - $sToday = date('Y-m-d H:i:s'); - if ($this->fieldActive && $this->fieldActiveFrom <= $sToday && ('0000-00-00 00:00:00' == $this->fieldActiveTo || $this->fieldActiveTo >= $sToday)) { - $bIsActive = true; - }" -TShopShippingGroup,"* check if the group is restricted by other groups (by the mlt field) and returns false if some of the restricted groups - * are found in the given list $aShippingGroupIdList. - * - * @param array $aShippingGroupIdList - * - * @return bool","public function IsValidForCurrentUser() - { - $bIsValidForUser = false; - $bIsValidGroup = false; - - $shippingGroupDataAccess = $this->getShippingGroupDataAccess(); - $aUserGroups = $shippingGroupDataAccess->getPermittedUserGroupIds($this->id); - if (!is_array($aUserGroups) || count($aUserGroups) < 1) { - $bIsValidGroup = true; - }" -TShopShippingGroup,"* returns true if the group has no user or user group restriction. - * - * @return bool","public function isValidForCurrentPortal() - { - $aPortalIdList = $this->getShippingGroupDataAccess()->getPermittedPortalIds($this->id); - if (!is_array($aPortalIdList) || count($aPortalIdList) < 1) { - $bIsValidForPortal = true; - }" -TShopShippingGroup,"* returns true if the shipping group is marked as active for the current time. - * - * @return bool","public function HasAvailableShippingTypes() - { - return $this->GetActingShippingTypes()->Length() > 0; - }" -TShopShippingGroup,* @return ShopShippingGroupDataAccessInterface,"public function HasAvailablePaymentMethods() - { - $bValidMethods = false; - $oMethods = $this->GetValidPaymentMethods(); - $bValidMethods = ($oMethods->Length() > 0); - - return $bValidMethods; - }" -TShopShippingGroup,"* return true if the shipping group is allowed for the current user. - * - * @return bool","public function HasPaymentMethod($sPaymentMethodId) - { - $oPaymentMethods = $this->GetValidPaymentMethods(); - - return $oPaymentMethods->IsInList($sPaymentMethodId); - }" -TShopShippingGroup,"* return true if the shipping group is allowed for the current portal. - * If no active portal was found and group was restricted to portal return false. - * - * @return bool","public function GetValidPaymentMethods($bRefresh = false) - { - if (is_null($this->oValidPaymentMethods) || $bRefresh) { - $this->oValidPaymentMethods = TdbShopPaymentMethodList::GetAvailableMethods($this->id); - $this->oValidPaymentMethods->bAllowItemCache = true; - }" -TShopShippingGroup,"* returns true if the group has shipping types available for the current user/basket - * in order to do this, we need to fetch all acting shipping types. if we have at least - * one, we can continue. - * - * @return bool","public function GetActingShippingTypes($bRefresh = false) - { - if (is_null($this->oActingShippingTypeList) || $bRefresh) { - $this->oActingShippingTypeList = TdbShopShippingTypeList::GetAvailableTypes($this->id); - $this->oActingShippingTypeList->bAllowItemCache = true; - }" -TShopShippingGroup,"* returns true if the group has payment methods available for the current user/basket. - * - * @return bool","public function GetPublicShippingTypes() - { - return TdbShopShippingTypeList::GetPublicShippingTypes($this->id); - }" -TShopShippingGroup,"* returns true, if the requested payment method id supported by this group for - * this user, then the function returns true. - * - * @param string $sPaymentMethodId - * - * @return bool","public function GetPublicPaymentMethods() - { - return TdbShopPaymentMethodList::GetPublicPaymentMethods($this->id); - }" -TShopShippingGroup,"* return list of valid payment methods. - * - * @param bool $bRefresh - set to true to force a regeneration of the list - * - * @return TdbShopPaymentMethodList - * @psalm-suppress InvalidNullableReturnType, NullableReturnStatement - In this instance we know that the return type cannot be null","public function GetShippingCostsForBasket() - { - if (is_null($this->dPrice)) { - $this->dPrice = 0; - $oActingShippingTypes = $this->GetActingShippingTypes(); - if (!is_null($oActingShippingTypes)) { - $this->dPrice = $oActingShippingTypes->GetTotalPrice(); - }" -TShopShippingGroup,"* @param bool $bRefresh - set to true to force a regeneration of the list - * - * @return TdbShopShippingTypeList - * returns a list of all shipping types that can act on the current basket/user","public function GetVat() - { - /** @var TdbShopVat|null $oVat */ - $oVat = $this->GetFromInternalCache('ovat'); - - if (is_null($oVat)) { - $oVat = null; - $oShopConf = TdbShop::GetInstance(); - if (true === $oShopConf->fieldShippingVatDependsOnBasketContents) { - $oBasket = TShopBasket::GetInstance(); - $oVat = $oBasket->GetLargestVATObject(); - if(null !== $oVat) { - $this->SetInternalCache('ovat', $oVat); - return $oVat; - }" -TShopShippingGroup,"* return all active public shipping types for group. - * - * @return TdbShopShippingTypeList","public function Render($sViewName = 'user-input', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - - $oShop = TdbShop::GetInstance(); - $oView->AddVar('oShop', $oShop); - $oView->AddVar('oShippingGroup', $this); - $oView->AddVar('oPaymentMethods', $this->GetValidPaymentMethodsSelectableByTheUser()); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopShippingGroup,"* return all active public shipping types for group. - * - * @return TdbShopPaymentMethodList","public function GetValidPaymentMethodsSelectableByTheUser() - { - $oPaymentMethods = clone $this->GetValidPaymentMethods(true); - $aInvalidMethods = array(); - $oPaymentMethods->GoToStart(); - while ($oPaymentMethod = $oPaymentMethods->Next()) { - $oHandler = $oPaymentMethod->GetFieldShopPaymentHandler(); - if ($oHandler && $oHandler->isBlockForUserSelection()) { - $aInvalidMethods[] = MySqlLegacySupport::getInstance()->real_escape_string($oPaymentMethod->id); - }" -TShopShippingGroup,"* @return float - * calculates the shipping costs for the current basket. - * The shipping costs are calculated using the following procedure: - * 1. The system fetches a list of all active shipping types (taking the user data and the active shipping group into account) - * - * 2. The system creates a temporary copy of the basket content object - * 3. For each shipping type, we get all articles in the basket to which the shipping type would apply according to the rules defined for the shipping type by: - * a. Loop through the temporary basket contents and move every article that matches the rule into the current shipping type - * b. Check if the shipping type applies to the resulting collection of articles. If not, dump the articles back into the temporary basket. If it does, add the shipping type to the basket active shipping list (aActiveShippingList). - * 4. Now mark each article in the real basket with a pointer to the corresponding shipping type - * 5. Finally sum up the shipping costs for each active shipping type","public function GetValidShippingTypesForBasketArticleListAndCountry($oBasketArticleList, $sDataCountryId) - { - $oValidShippingTypes = new TIterator(); - /** @var $oValidShippingTypes TIterator* */ - $oShippingTypes = $this->GetFieldShopShippingTypeList('position'); - while ($oShippingType = $oShippingTypes->Next()) { - $bIsValid = $oShippingType->IsActive(); - $bIsValid = $bIsValid && $oShippingType->isValidForCurrentPortal(); - $bIsValid = $bIsValid && $oShippingType->IsValidForCurrentUser(false); - $bIsValid = $bIsValid && $oShippingType->IsValidForCountry($sDataCountryId); - if ($bIsValid) { - $oAffectedArticles = $oBasketArticleList->GetArticlesAffectedByShippingType($oShippingType); - $bIsValid = ($oAffectedArticles->Length() > 0); - }" -TShopShippingGroup,"* return the vat group for this shipping group. - * - * @return TdbShopVat|null","public function GetShippingCostsForBasketArticleListAndCountry($oBasketArticleList, $sDataCountryId) - { - /** @var Request $request */ - $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest(); - - $oBasketArticleList->GoToStart(); - - $oOldBasket = clone TShopBasket::GetInstance(); - $oOldUser = clone TdbDataExtranetUser::GetInstance(); - - $oTmpBasket = new TShopBasket(); - if (null !== $request && true === $request->hasSession()) { - $request->getSession()->set(TShopBasket::SESSION_KEY_NAME, $oTmpBasket); - }" -TShopShippingGroupList,"* return all shipping groups available to the current user with the current basket. - * - * @return TdbShopShippingGroupList","public function RemoveInvalidItems() - { - // since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them - $oBasket = TShopBasket::GetInstance(); - if (null === $oBasket) { - return; - }" -TShopShippingGroupList,"* search for a shipping group that supports the given payment type - * returns false if nothing is found. - * - * @param string $sPaymentInternalName - * - * @return TdbShopShippingGroup|false","public function RemoveRestrictedItems() - { - // since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them - $aValidIds = array(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - if ($oItem->IsPublic()) { - $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id); - }" -TShopShippingType,* @var float|null,"public function IsAvailable() - { - $bIsValid = true; - $bIsValid = ($bIsValid && $this->IsActive()); - $bIsValid = ($bIsValid && $this->isValidForCurrentPortal()); - $bIsValid = ($bIsValid && $this->IsValidForCurrentUser()); - $bIsValid = ($bIsValid && $this->IsValidForBasket()); - - return $bIsValid; - }" -TShopShippingType,"* holds a pointer to every entry in the basket that is affected by the shipping type. - * - * @var TShopBasketArticleList","public function endShippingTypeChain() - { - return true === $this->fieldEndShippingTypeChain; - }" -TShopShippingType,"* return true if this shipping type is valid for the current user / basket. - * - * @return bool","public function IsPublic() - { - $bIsPublic = true; - - if (!$this->IsActive()) { - $bIsPublic = false; - }" -TShopShippingType,* @return bool,"public function IsActive() - { - $bIsActive = false; - $sToday = date('Y-m-d H:i:s'); - if ($this->fieldActive && $this->fieldActiveFrom <= $sToday && ('0000-00-00 00:00:00' == $this->fieldActiveTo || $this->fieldActiveTo >= $sToday)) { - $bIsActive = true; - }" -TShopShippingType,"* returns true if the group has no user or user group restriction. - * - * @return bool","public function IsValidForCurrentUser($bCheckShippingCountry = true) - { - $bIsValidForUser = false; - $bIsValidGroup = false; - $bIsValidShippingCountry = false; - - $oUser = TdbDataExtranetUser::GetInstance(); - - if ($this->fieldRestrictToSignedInUsers || $oUser->IsLoggedIn() || $oUser->HasData()) { - $typeDataAccess = $this->getShopShippingTypeDataAccess(); - if ($oUser->IsLoggedIn() || $oUser->HasData()) { - // check user group - $aUserGroups = $typeDataAccess->getPermittedUserGroupIds($this->id); - if (!is_array($aUserGroups) || count($aUserGroups) < 1) { - $bIsValidGroup = true; - }" -TShopShippingType,"* returns true if the shipping group is marked as active for the current time. - * - * @return bool","public function IsValidForCountry($sDataCountryId) - { - $bIsValidForCountry = false; - $aShippingCountryRestriction = $this->getShopShippingTypeDataAccess()->getPermittedCountryIds($this->id); - if (count($aShippingCountryRestriction) > 0) { - if (in_array($sDataCountryId, $aShippingCountryRestriction)) { - $bIsValidForCountry = true; - }" -TShopShippingType,"* return true if the shipping group is allowed for the current user. - * - * @return bool - * - * @param bool $bCheckShippingCountry","public function isValidForCurrentPortal() - { - $aPortalIdList = $this->getShopShippingTypeDataAccess()->getPermittedPortalIds($this->id); - if (!is_array($aPortalIdList) || count($aPortalIdList) < 1) { - $bIsValidForPortal = true; - }" -TShopShippingType,"* @param null|string $sDataCountryId - * - * @return bool","public function IsValidForBasket() - { - $bValidForBasket = false; - $oArticles = $this->GetAffectedBasketArticles(); - $bValidForBasket = ($oArticles->Length() > 0); - - return $bValidForBasket; - }" -TShopShippingType,"* return true if the shipping group is allowed for the current portal. - * If no active portal was found and group was restricted to portal return false. - * - * @return bool","public function GetAffectedBasketArticles() - { - if (is_null($this->oAffectedBasketArticles)) { - $this->oAffectedBasketArticles = null; - $oBasket = TShopBasket::GetInstance(); - $this->oAffectedBasketArticles = $oBasket->GetArticlesAffectedByShippingType($this); - }" -TShopShippingType,"* checks if the current shipping type is available for the current basket - * affected articles in the basket will be marked with the shipping type. - * - * @return bool","public function ArticleAffected(TShopBasketArticle $oArticle) - { - $shopShippingTypeDataAccess = $this->getShopShippingTypeDataAccess(); - $bAffected = false; - $oArticleShippingType = $oArticle->GetActingShippingType(); - // if the article is already marked with this shipping type, then we keep it - if (!is_null($oArticleShippingType) && $oArticleShippingType->id == $this->id) { - $bAffected = true; - }" -TShopShippingType,"* loads the affected basket articles into $this->oAffectedBasketArticles - * also returns list. will only load the articles if $this->oAffectedBasketArticles is null. - * - * @return TShopBasketArticleList","public function ArticleListValidForShippingType(TShopBasketArticleList $oArticleList) - { - $bIsValid = true; - $dArticleValue = $oArticleList->dProductPrice; - $dNumberOfArticles = $oArticleList->dNumberOfItems; - $dArticleWeight = $oArticleList->dTotalWeight; - $dArticleVolume = $oArticleList->dTotalVolume; - - if ($this->fieldValueBasedOnEntireBasket) { - $oBasket = TShopBasket::GetInstance(); - $dArticleValue = $oBasket->dCostArticlesTotalAfterDiscounts; - }" -TShopShippingType,* @return ShopShippingTypeDataAccessInterface,"public function GetPrice() - { - if (is_null($this->dPrice)) { - $this->dPrice = 0; - - // price based on basket - if ($this->fieldValueBasedOnEntireBasket) { - $oBasket = TShopBasket::GetInstance(); - $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation = 0; - $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation = 0; - $oItemList = $oBasket->GetBasketContents(); - $oItemList->GoToStart(); - while ($oItem = $oItemList->Next()) { - if ($oItem->fieldExcludeFromShippingCostCalculation) { - $iTotalNumberOfArticlesInBasketThatAreExcludedFromShippingCostCalculation += $oItem->dAmount; - $iTotalDiscountedPriceOfArticlesInBasketThatAreExcludedFromShippingCostCalculation += $oItem->dPriceTotalAfterDiscount; - }" -TShopShippingType,"* checks if a basket article should be affected by this shipping type - * this can only happen if the article is not affected by any other shipping type. - * - * @param TShopBasketArticle $oArticle - * - * @return bool","public function GetPriceForBasketArticleList($oBasketArticleList) - { - if (is_null($this->dPrice)) { - $this->dPrice = 0; - - $dTotalNumberOfArticles = 0; - $oBasketArticleList->GoToStart(); - while ($oBasketArticle = $oBasketArticleList->Next()) { - /** @var $oBasketArticle TShopBasketArticle* */ - $dTotalNumberOfArticles += $oBasketArticle->dAmount; - }" -TShopShippingTypeList,* @var float|null,"public function RemoveInvalidItems() - { - // since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them - $allIds = array(); - $aValidIds = array(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - $allIds[] = $oItem->id; - if ($oItem->IsAvailable()) { - $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id); - }" -TShopShippingTypeList,* @return ShopShippingTypeDataAccessInterface,"public function RemoveRestrictedItems() - { - // since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them - $aValidIds = array(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - if ($oItem->IsPublic()) { - $aValidIds[] = MySqlLegacySupport::getInstance()->real_escape_string($oItem->id); - }" -TShopShippingTypeList,* @return ShopServiceInterface,"public function GetTotalPrice() - { - if (is_null($this->dPrice)) { - $this->dPrice = 0; - - // we first need to check if there is one shipping type that is supposed to affect the - // complete basket. if that is the case, we need to make sure we move that to the front - // and therby ONLY use it (it will automatically affect ALL items) - $oItemForCompleteBasket = $this->FindItemWithProperty('fieldApplyToAllProducts', true); - if ($oItemForCompleteBasket) { - $this->dPrice = $oItemForCompleteBasket->GetPrice(); - }" -TShopStockMessage,"* @var null|array{amount: int, range: float, oTrigger: TdbShopStockMessageTrigger}[]","public function GetShopStockMessage() - { - $oShopStockMessageTrigger = null; - $sMessage = $this->RenderStockMessage(); - if (is_object($this->GetArticle()) && property_exists($this->GetArticle(), 'dAmount') && is_null($this->aMessagesForQuantity)) { - /** - * @psalm-suppress UndefinedPropertyFetch - We are explicitly checking if the property exists above - */ - $this->aMessagesForQuantity = $this->GetMessagesFromTriggerForQuantity($this->GetArticle()->dAmount); - }" -TShopStockMessage,* @var string|null,"public function SetArticle($oArticle) - { - $this->sArticleKey = $oArticle->id; - TCacheManagerRuntimeCache::SetContent($this->sArticleKey, $oArticle, 'TShopArticle', 3); - $oShopStockMessageTrigger = $this->GetFieldShopStockMessageTrigger(); - if (!is_null($oShopStockMessageTrigger)) { - $this->fieldName = $oShopStockMessageTrigger->fieldMessage; - $this->fieldClass = $oShopStockMessageTrigger->fieldCssClass; - }" -TShopStockMessage,"* @param null $sData - * @param null $sLanguage - * - * @return TdbShopStockMessage","public function __destruct() - { - TCacheManagerRuntimeCache::UnsetKey($this->sArticleKey); - }" -TShopStockMessage,"* renders. - * - * @return string","public function GetArticle() - { - if (null === $this->sArticleKey) { - return false; - }" -TShopStockMessage,* @psalm-suppress UndefinedPropertyFetch - We are explicitly checking if the property exists above,"public function GetFieldShopStockMessageTrigger() - { - /** @var TdbShopStockMessageTrigger|null $oShopStockMessageTrigger */ - $oShopStockMessageTrigger = $this->GetFromInternalCache('oActive_shop_stock_message_trigger_id'); - - if (is_null($oShopStockMessageTrigger)) { - $sQuery = ""SELECT * - FROM `shop_stock_message_trigger` - WHERE `shop_stock_message_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' - AND `amount` >= '"".MySqlLegacySupport::getInstance()->real_escape_string($this->GetArticle()->getAvailableStock()).""' - ORDER BY `amount` ASC - LIMIT 1 - ""; - $oShopStockMessageTrigger = TdbShopStockMessageTrigger::GetNewInstance(); - /** @var $oShopStockMessageTrigger TdbShopStockMessageTrigger */ - $oTmp = MySqlLegacySupport::getInstance()->fetch_object(MySqlLegacySupport::getInstance()->query($sQuery)); - //if (!$oShopStockMessageTrigger->LoadFromRow(MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($sQuery)))) $oShopStockMessageTrigger = null; - if (is_object($oTmp)) { - if (!$oShopStockMessageTrigger->LoadFromField('id', $oTmp->id)) { - $oShopStockMessageTrigger = null; - }" -TShopStockMessage,"* return a css class for messages that depending on quantity - * for example article has a stock of 10 but the user wants to buy 20 so the user gets the normal stock message AND the message that there is an other stock message / state for an amount of 10 - * these class is used for the message for the amount that could not be shipped yet. - * - * @param array $aMessageForQuantity - * - * @return string","public function GetFieldShopStockMessageTriggerList() - { - return $this->GetFieldShopStockMessageTriggerListOrdered(); - }" -TShopStockMessage,"* renders the stock message. - * - * @return string","public function GetFieldShopStockMessageTriggerListOrdered(array $aOrderBy = null) - { - $oTriggerList = $this->GetFromInternalCache('oShopStockMessageTriggerList'); - if (is_null($oTriggerList)) { - $oTriggerList = parent::GetFieldShopStockMessageTriggerList(); - if ($aOrderBy) { - $oTriggerList->ChangeOrderBy($aOrderBy); - }" -TShopSystemInfo,"* used to display the info page. - * - * @param string $sViewName - the view to use - * @param string $sViewType - where the view is located (Core, Custom-Core, Customer) - * @param array $aCallTimeVars - place any custom vars that you want to pass through the call here - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oInfo', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopUnitOfMeasurement,"* manages the content quantity for products (needed for base price calculations). -/*","public function GetBasePrice($sourcePrice, $sourceQuantity) - { - if (empty($this->fieldFactor)) { - $factor = 1; - }" -TShopUnitOfMeasurement,"* Returns the base price for the source price. - * - * @param float $sourcePrice - * @param float $sourceQuantity - * - * @return float","public function GetFieldShopUnitOfMeasurement() - { - if (empty($this->fieldShopUnitOfMeasurementId)) { - return $this; - }" -TShopUserNoticeList,"* return link that can be used to remove the item from the notice list. - * - * @return string","public function GetRemoveFromNoticeListLink() - { - $oShop = TdbShop::GetInstance(); - $aParams = array('module_fnc['.$oShop->GetBasketModuleSpotName().']' => 'RemoveFromNoticeList', MTShopBasketCore::URL_ITEM_ID => $this->fieldShopArticleId); - - return $this->getActivePageService()->getLinkToActivePageRelative($aParams); - }" -TShopUserNoticeList,* @return string,"public function GetRemoveFromNoticeListLinkAjax() - { - $oShop = TdbShop::GetInstance(); - $aParams = array('module_fnc['.$oShop->GetBasketModuleSpotName().']' => 'ExecuteAjaxCall', '_fnc' => 'RemoveFromNoticeListAjax', MTShopBasketCore::URL_ITEM_ID => $this->fieldShopArticleId); - - return $this->getActivePageService()->getLinkToActivePageRelative($aParams); - }" -TShopUserNoticeList,"* @param string $sViewName - * @param string $sSubType - * @param string $sType - * @param array $aCallTimeVars - * - * @return string","public function Render($sViewName, $sSubType = 'pkgShop/views/db/TShopUserNoticeList', $sType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oNoticeItem', $this); - $oArticle = $this->GetFieldShopArticle(); - $oView->AddVar('oArticle', $oArticle); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - - return $oView->RenderObjectPackageView($sViewName, $sSubType, 'Customer'); - }" -TShopVariantSet,"* return an array of fields that may be edited for variants of this set. - * - * @return array","public function GetChangableFieldNames() - { - $aFieldNames = $this->GetFromInternalCache('aChangableFieldNames'); - if (is_null($aFieldNames)) { - $aFieldNames = array(); - $oFields = $this->GetFieldCmsFieldConfList(); - while ($oField = $oFields->Next()) { - $aFieldNames[] = $oField->fieldName; - }" -TShopVariantSet,"* returns true if the field name passed is allowed to be edtited for variants of this set type. - * - * @param string $sFieldName - * - * @return bool","public function AllowEditOfField($sFieldName) - { - $aFieldsEditable = $this->GetChangableFieldNames(); - $sFieldName = str_replace('`', '', $sFieldName); - - return in_array($sFieldName, $aFieldsEditable); - }" -TShopVariantSet,"* Anzeigemanager für die Variantenauswahl im Shop. - * - * @return TdbShopVariantDisplayHandler|null","public function GetFieldShopVariantDisplayHandler() - { - /** @var TdbShopVariantDisplayHandler|null $oItem */ - $oItem = $this->GetFromInternalCache('oLookupshop_variant_display_handler_id'); - - if (is_null($oItem)) { - $oItem = TdbShopVariantDisplayHandler::GetInstance($this->fieldShopVariantDisplayHandlerId); - $this->SetInternalCache('oLookupshop_variant_display_handler_id', $oItem); - }" -TShopVariantSet,@var TdbShopVariantDisplayHandler|null $oItem,"public function GetVariantTypeForIdentifier($sVariantTypeIdentifier) - { - /** @var TdbShopVariantType|null $oType */ - $oType = $this->GetFromInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier); - - if (is_null($oType)) { - $oType = TdbShopVariantType::GetNewInstance(); - if (!$oType->Loadfromfields(array('shop_variant_set_id' => $this->id, 'identifier' => $sVariantTypeIdentifier))) { - $oType = null; - }" -TShopVariantType,"* Verfügbare Variantenwerte. - * - * @return TdbShopVariantTypeValueList","public function GetFieldShopVariantTypeValueList() - { - $oValueList = TdbShopVariantTypeValueList::GetListForShopVariantTypeId($this->id, $this->iLanguageId); - $oValueList->ChangeOrderBy(array($this->fieldShopVariantTypeValueCmsfieldname => 'ASC')); - - return $oValueList; - }" -TShopVariantTypeValue,"* returns the url string part (type/value) for the value. - * - * @return string","public function GetURLString() - { - $sURLString = $this->GetFromInternalCache('sURLString'); - - if (is_null($sURLString)) { - $oType = $this->GetFieldShopVariantType(); - - $urlNormalizationUtil = $this->getUrlNormalizationUtil(); - if (empty($oType->fieldUrlName)) { - $oType->fieldUrlName = $urlNormalizationUtil->normalizeUrl($oType->fieldName); - }" -TShopVat,"* holds the gross total value on which the vat will act. - * - * @var float","public function addValue($dValue) - { - $this->dTotalValue += $dValue; - $this->recalculate(); - }" -TShopVat,@var float,"public function reset() - { - $this->dTotalValue = 0; - $this->dNetValue = 0; - $this->dGrossValue = 0; - $this->dVatValue = 0; - }" -TShopVat,@var float,"public function getTotalValue() - { - return $this->dTotalValue; - }" -TShopVat,@var float,"public function getNetValue() - { - return round($this->dNetValue, 2); - }" -TShopVat,"* @param float|int $dValue - * - * @return void","public function getGrossValue() - { - return 0; - }" -TShopVat,* @return void,"public function GetVatValue() - { - return round($this->dVatValue, 2); - }" -TShopVatList,"* get the total vat value for the current group. - * - * @return float","public function GetTotalVatValue() - { - $dVal = 0; - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - $dVal += $oItem->GetVatValue(); - }" -TShopVatList,"* get the total net value for the current group. - * - * @return float","public function GetTotalNetValue() - { - $dVal = 0; - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - $dVal += $oItem->getNetValue(); - }" -TShopVatList,"* get the total gross value for the current group. - * - * @return float","public function GetTotalValue() - { - $dVal = 0; - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - $dVal += $oItem->getTotalValue(); - }" -TShopVatList,"* return largest item in list. - * - * @return TdbShopVat|null","public function GetMaxItem() - { - /** @var null|TdbShopVat $oMaxItem */ - $oMaxItem = null; - $iPt = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - if ($oItem->getTotalValue() > 0 && (is_null($oMaxItem) || $oItem->getTotalValue() > $oMaxItem->getTotalValue())) { - $oMaxItem = $oItem; - }" -TShopVoucher,"* Im System können Gutscheine hinterlegt werden, die einen absoluten oder prozentualen Wert als Nachlass gewähren. Prozentuale Nachlässe beziehen sich immer auf die Bruttosumme der Produkte, bevor Rabatte oder Ähnliches angerechnet werden. Zusätzlich kann bei einem Gutschein ein Gratisartikel hinterlegt werden. Wird ein solcher Gutschein mit Gratisartikel eingelöst, legt das System den Artikel mit einem Wert von 0€ in den Warenkorb. Zusätzlich erscheint der Hinweis über welchen Gutschein der Artikel in den Warenkorb gelegt wurde. Neben dem Hinweis erscheint zusätzlich ein Link über den der Gutschein wieder aus dem Warenkorb genommen werden kann. - * - * Geldwerte Gutscheine erscheinen unterhalb der Produktbruttosumme mit Namen und Wert. Zusätzlich wird neben jedem Gutschein ein Link angezeigt über den der Gutschein wieder aus dem Warenkorb genommen werden kann. - * Gutscheine werden generell in Gutscheinserien angelegt. Alle Einstellungen beziehen sich auf die Gutscheinserie, und damit auf alle Gutscheine in dieser Gutscheinserie. Für eine Gutscheinserie können automatisch Gutscheine generiert werden. Hier kann entweder ein fester Gutscheincode angegeben werden, oder vom System für jeden Gutschein automatisch generiert werden. - * - * Innerhalb einer Gutscheinserie darf ein Gutscheincode mehr als einmal vorkommen, ein Gutscheincode darf aber nie in mehr als einer Gutscheinserie verwendet werden. Bei jedem Gutschein wird ein Erstellungsdatum hinterlegt. - * - * Der Gutscheinwert selbst wird immer aus der Gutscheinserie genommen (verändert man diesen Wert, verändert sich auch automatisch der Gutscheinwert). Bei jeder Verwendung eines Gutscheins, wird das Datum, der Benutzer, sowie der Verbrauchswert beim Gutschein in der Gutscheinverwendungsliste hinterlegt. Sobald der Gutschein komplett verbraucht ist, wird das Verbrauchsdatum hinterlegt und der Gutschein als verbraucht markiert. - * Die Gutscheine einer Gutscheinserie können als CSV Exportiert werden. Für jeden Gutschein werden folgende Daten exportiert: - * • Code - * • Datum - * • Verbraucht (Ja/Nein) - * • Verbrauchsdatum - * • Restwert - * - * Gutscheine können für alle Benutzer verwendbar sein, oder auf bestimmte Benutzergruppen oder Benutzer eingeschränkt werden. - * - * Gutscheine können einen Gutscheinsponsor haben der für den Gutschein gezahlt hat. Gutscheinsponsoren können zusätzlich zur Gutscheininformation auf der Webseite mit Name und Bild angezeigt werden. - * - * Gutscheine (die nicht „gesponsert“ und damit nicht tatsächlich bezahlt sind) dürfen nicht auf Artikel greifen, für die die Buchpreisbindung gilt. Die für den Gutschein relevante Mindestbestellsumme, sowie der Warenkorbwert der nicht unter null fallen darf bezieht sich immer auf die Summe der Artikel die keiner Buchpreisbindung unterliegen. - * - * Folgende zusätzliche Einstellungen und Einschränkungen sind möglich: - * • Über ein Start- und Enddatum kann ein Gutschein auf eine Zeitspanne eingeschränkt werden. - * - * • Es kann ein Mindestbestellwert definiert werden, der überschritten werden muss, bevor der Gutschein akzeptiert wird. - * - * • Ob der Gutschein mit einem anderen Gutschein der gleichen Gutscheinserie verwendet werden kann - * • Ob der Gutschein mit anderen Gutscheinen (egal von welcher Gutscheinserie) verwendet werden kann. - * - * • Ob ein Kunde Gutscheine dieser Gutscheinserie generell nur einmal verwenden darf (also auch nicht bei zwei getrennten Bestellungen) - * - * • Ob der Gutschein nur bei der ersten Bestellung des Benutzers verwendet werden kann. - * - * • Ob der Gutschein die Versandkosten aufheben soll. - * - * • Es ist möglich den Gutschein als einen „gesponserten“ Gutschein zu Markieren. Zusätzlich kann der Name des Sponsors, ein Bild, und ein Logo hinterlegt werden. „Gesponserte“ Gutscheine ignorieren die Buchpreisbindungseinstellungen der Warenkorbartikel im Warenkorb. - * Die für Gutscheine relevanten Berechnungsregeln werden im Detail unter 3.a.i beschrieben. -/*","public function GetRemoveFromBasketLink($sMessageHandler = null) - { - if (is_null($sMessageHandler)) { - $sMessageHandler = MTShopBasketCore::MSG_CONSUMER_NAME; - }" -TShopVoucher,"* constants below define the status returned when checking if a voucher can be - * used in the current basket.","public function IsSameAs($oItem) - { - if (!is_null($this->sBasketVoucherKey) || !is_null($oItem->sBasketVoucherKey)) { - return 0 == strcmp($this->sBasketVoucherKey, $oItem->sBasketVoucherKey); - }" -TShopVoucher,* voucher may be used.,"public function AllowUseOfVoucher() - { - $bAllowUse = TdbShopVoucher::ALLOW_USE; - - $oBasket = TShopBasket::GetInstance(); - $oExistingVouchers = $oBasket->GetVoucherList(); - if (!is_null($oExistingVouchers)) { - $oMatchingVoucher = $oExistingVouchers->FindItemWithProperty('id', $this->id); - if ($oMatchingVoucher) { - $bAllowUse = TdbShopVoucher::USE_ERROR_OTHER_VOUCHER_USED; - }" -TShopVoucher,* the voucher series to which this voucher belongs is currently inactive (or the active date is out of range).,"public function GetValue($bCalculateVoucher = false, $dMaxValueAllowed = null, $bSponsoredVouchers = false) - { - if ($bCalculateVoucher) { - $oSeries = $this->GetFieldShopVoucherSeries(); - $dValue = $oSeries->fieldValue; - $oBasket = TShopBasket::GetInstance(); - $dBasketValueApplicableForVoucher = $oBasket->GetBasketSumForVoucher($this); - if ('prozent' == $oSeries->fieldValueType) { - $dValue = round($dBasketValueApplicableForVoucher * ($dValue / 100), 2); - }" -TShopVoucher,* the basket value is below the minimum value specified for the voucher series.,"public function GetValuePreviouslyUsed() - { - // we have to make sure that is value is accurate... so we will fetch it from database every time - // performance should not be a big issue, since it only affects users that include a voucher in their basket - $dValueUsed = 0; - $query = ""SELECT SUM(`value_used`) AS totalused - FROM `shop_voucher_use` - INNER JOIN `shop_order` ON `shop_voucher_use`.`shop_order_id` = `shop_order`.`id` - WHERE `shop_voucher_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' - AND `shop_order`.`canceled` = '0' - ""; - if ($aValue = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { - if (null !== $aValue['totalused']) { - $dValueUsed = $aValue['totalused']; - }" -TShopVoucher,"* another voucher of the same series is already used within the basket even though - * the voucher series has been defined as ""only one of the same series per basket"".","public function CommitVoucherUseForCurrentUser($iShopOrderId) - { - $oShopVoucherUse = TdbShopVoucherUse::GetNewInstance(); - /** @var $oShopvoucherUse TdbShopVoucherUse */ - $aData = array('shop_voucher_id' => $this->id, 'date_used' => date('Y-m-d H:i:s'), 'value_used' => $this->GetValue(), 'shop_order_id' => $iShopOrderId); - // hook to post-convert value (as may be required when dealing with currency) - $this->CommitVoucherUseForCurrentUserPreSaveHook($aData); - $oShopVoucherUse->LoadFromRow($aData); - $oShopVoucherUse->AllowEditByAll(true); - $oShopVoucherUse->Save(); - - if ($this->checkMarkVoucherAsCompletelyUsed()) { - $this->MarkVoucherAsCompletelyUsed(); - }" -TShopVoucher,"* another voucher is already being used within the basket even though - * the voucher series has been defined as ""may not be used with any other voucher"".","public function checkMarkVoucherAsCompletelyUsed() - { - $bMarkVoucherAsCompletelyUsed = false; - $oVoucherSeries = $this->GetFieldShopVoucherSeries(); - if ('absolut' == $oVoucherSeries->fieldValueType && !is_null($oVoucherSeries->GetFieldShopVoucherSeriesSponsor())) { - $dValueUsed = $this->GetValuePreviouslyUsed(); - if ($dValueUsed >= $this->GetVoucherSeriesOriginalValue()) { - $bMarkVoucherAsCompletelyUsed = true; - }" -TShopVoucher,"* the customer used a voucher of this series before for a previous order even though - * the series has been marked as ""only one voucher per customer"".","public function MarkVoucherAsCompletelyUsed() - { - $aData = $this->sqlData; - $aData['date_used_up'] = date('Y-m-d H:i:s'); - $aData['is_used_up'] = '1'; - $this->LoadFromRow($aData); - $bEditState = $this->bAllowEditByAll; - $this->AllowEditByAll(true); - $this->Save(); - $this->AllowEditByAll($bEditState); - }" -TShopVoucher,"* this is not the first order from the customer, but the voucher series has been defined - * as ""use only on first order"".","public function AllowVoucherForArticle(TShopBasketArticle $oArticle) - { - $bMayBeUsed = true; - - $oVoucherDef = $this->GetFieldShopVoucherSeries(); - - if ($oArticle->fieldExcludeFromVouchers && empty($oVoucherDef->fieldShopVoucherSeriesSponsorId)) { - $bMayBeUsed = false; - }" -TShopVoucher,"* the voucher has been restricted to a set of customers, and the current customer is not in that list.","public function IsSponsored() - { - $bIsSponsored = $this->GetFromInternalCache('bVoucherIsSponsored'); - if (is_null($bIsSponsored)) { - $bIsSponsored = false; - $oVoucherSeries = $this->GetFieldShopVoucherSeries(); - if ($oVoucherSeries && !empty($oVoucherSeries->fieldShopVoucherSeriesSponsorId)) { - $bIsSponsored = true; - }" -TShopVoucherSeries,* @return TdbShopVat|null,"public function GetVat() - { - return $this->GetFieldShopVat(); - }" -TShopVoucherSeries,"* return true if the voucher series is active. - * - * @return bool","public function IsActive() - { - $sToday = date('Y-m-d H:i:s'); - $bIsActive = ($this->fieldActive && ($this->fieldActiveFrom <= $sToday && ($this->fieldActiveTo >= $sToday || '0000-00-00 00:00:00' == $this->fieldActiveTo))); - - return $bIsActive; - }" -TShopVoucherSeries,"* returns the number of vouchers from that series that have been used by the user (note, we count - * also the vouchers that have been used in part only. - * - * @param int $iDataExtranetUserId (if null, use the current user) - * @param array $aExcludeVouchers - the voucher ids to exclude from the count - * - * @return int","public function NumberOfTimesUsedByUser($iDataExtranetUserId = null, $aExcludeVouchers = array()) - { - $iNumberOfVouchersUsed = 0; - - if (is_null($iDataExtranetUserId)) { - $oUser = TdbDataExtranetUser::GetInstance(); - $iDataExtranetUserId = $oUser->id; - }" -TShopVoucherSeries,"* create a new voucher. - * - * @param string $sCode - code to create - * - * @return TdbShopVoucher","public function CreateNewVoucher($sCode = null) - { - if (is_null($sCode)) { - $bCodeUnique = false; - $dMaxTry = 15; - $sCode = ''; - while (!$bCodeUnique && $dMaxTry > 0) { - --$dMaxTry; - $sCode = TdbShopVoucher::GenerateVoucherCode(); - $query = ""SELECT * FROM `shop_voucher` WHERE `code` = '"".MySqlLegacySupport::getInstance()->real_escape_string($sCode).""'""; - $tRes = MySqlLegacySupport::getInstance()->query($query); - if (0 == MySqlLegacySupport::getInstance()->num_rows($tRes)) { - $bCodeUnique = true; - }" -TShop_DataExtranetGroup,"* @return bool - * - * @param string $sUserid - * @param float $dOrderValue","public function UpdateAutoAssignAllUsers() - { - // get all users that no longer apply - $query = ""DELETE FROM `data_extranet_user_data_extranet_group_mlt` WHERE `data_extranet_user_data_extranet_group_mlt`.`target_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""'""; - MySqlLegacySupport::getInstance()->query($query); - - // now add group to every one with the corrseponding value - $query = ""SELECT `data_extranet_user`.`id` AS source_id, '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' AS target_id - FROM `data_extranet_user` - LEFT JOIN `shop_order` ON `data_extranet_user`.`id` = `shop_order`.`data_extranet_user_id` - AND (`shop_order`.`id` IS NULL OR `shop_order`.`canceled` = '0') - GROUP BY `data_extranet_user` .`id` - HAVING - (SUM(`shop_order`.`value_total`) >= {$this->fieldAutoAssignOrderValueStart}" -TCMSWizardStepShopAddressShipping,"* define any methods of the class that may be called via get or post. - * - * @return array","public function AllowedMethods() - { - $externalFunctions = parent::AllowedMethods(); - $externalFunctions[] = 'ShowShippingAddressInput'; - $externalFunctions[] = 'HideShippingAddressInput'; - - return $externalFunctions; - }" -TCMSWizardStepShopAddressShipping,"* @param bool $bState - * - * @return void","public function ShowShippingAddressInput() - { - $this->SetShowShippingAddressInputState(true); - }" -TCMSWizardStepShopAddressShipping,"* set state variable to show shipping address input. method returns false, so that - * the same step is returned. - * - * @return void","public function HideShippingAddressInput() - { - $this->SetShowShippingAddressInputState(false); - $this->ExecuteStep(); - }" -TCMSWizardStepShopTellAFriend,* @deprecated since 6.2.0 - no longer used.,"public function Init() - { - $oGlobal = TGlobal::instance(); - $this->aUserInput = $oGlobal->GetUserData('aInput'); - if (!is_array($this->aUserInput)) { - $this->aUserInput = array(); - }" -TShopModuleArticleListFilter,"* set to true if the base query was generated instead of a custom query from an extension. - * - * @var bool","public function ModuleInitHook() - { - }" -TShopModuleArticleListFilter,"* set to false if you want to prevent the list from caching. - * - * @var bool","public function PreventUseOfParentObjectWhenNoRecordsAreFound() - { - return false; - }" -TShopModuleArticleListFilter,"* @var array","public function getFallbackListFilter() - { - if ('tdbshopmodulearticlelistfilter' === strtolower(get_class($this))) { - return null; - }" -TShopModuleArticleListFilter,"* factory creates a new instance and returns it. - * - * @param string|array $sData - either the id of the object to load, or the row with which the instance should be initialized - * @param string $sLanguage - init with the language passed - * - * @return TdbShopModuleArticleListFilter","public function GetListQuery($oListConfig) - { - $sQuery = $this->GetListQueryBase($oListConfig); - $aRestrictions = $this->GetGlobalQueryRestrictions($oListConfig); - if (count($aRestrictions) > 0) { - $sQuery .= ' AND (('.implode(') AND (', $aRestrictions).'))'; - }" -TShopModuleArticleListFilter,"* @psalm-suppress InvalidPropertyAssignmentValue - through `$canBeCached` we know that at this place, `$cacheKey` is not `null`","public function _AllowCache() - { - return $this->bAllowCache; - }" -TShopModuleArticleListFilter,"* is called when the module initializes. - * - * @return void","public function _GetCacheParameters() - { - $aParams = array(); - $oShop = TdbShop::GetInstance(); - - $oActiveCategory = $oShop->GetActiveCategory(); - if (!is_null($oActiveCategory)) { - $aParams['activecategoryid'] = $oActiveCategory->id; - }" -TShopModuleArticleListFilter,"* prevent the use of the parent object when this filter finds not articles. - * - * @return bool","public function _GetCacheTableInfos() - { - $aClearCacheInfo = array(); - - return $aClearCacheInfo; - }" -TShopModuleArticlelistFilterAccessories,"* return the base of the query. overwrite this method for each filter to add custom filtering - * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... - * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) - * NOTE 2: the query will automatically be restricted to all active articles. - * NOTE 3: you query must include a where statement. - * - * @param TdbShopModuleArticleList $oListConfig - * - * @return string","public function _GetCacheParameters() - { - $aParams = parent::_GetCacheParameters(); - $oShop = TdbShop::GetInstance(); - - $oActiveArticle = $oShop->GetActiveItem(); - if (!is_null($oActiveArticle)) { - $aParams['articleId'] = $oActiveArticle->id; - }" -TShopModuleArticlelistFilterAllArticlesOfActiveCategoryTree,"* show all articles in the active category... including the categories children. -/*","public function PreventUseOfParentObjectWhenNoRecordsAreFound() - { - return true; - }" -TShopModuleArticlelistFilterAllArticlesOfActiveNonLeafCategory,"* return the base of the query. overwrite this method for each filter to add custom filtering - * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... - * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) - * NOTE 2: the query will automatically be restricted to all active articles. - * NOTE 3: you query must include a where statement. - * - * @param TdbShopModuleArticleList $oListConfig - * - * @return string","public function PreventUseOfParentObjectWhenNoRecordsAreFound() - { - return true; - }" -TShopModuleArticlelistFilterArticleOfActiveManufacturer,"* show all articles from the active manufacturer. -/*","public function _GetCacheParameters() - { - $aParams = array(); - $oShop = TdbShop::GetInstance(); - - $oActiveCategory = $oShop->GetActiveCategory(); - if (!is_null($oActiveCategory)) { - $aParams['activecategoryid'] = $oActiveCategory->id; - }" -TShopModuleArticlelistFilterArticleSuggestions,"* this is just a stub that acts just like a manuell selection for now - we need to define - * some algorithm that finds articles related to the current article (such as matching tags, attributes, etc). -/*","public function _GetCacheParameters() - { - $aParams = parent::_GetCacheParameters(); - $oShop = TdbShop::GetInstance(); - - $oActiveArticle = $oShop->GetActiveItem(); - if (!is_null($oActiveArticle)) { - $aParams['articleId'] = $oActiveArticle->id; - }" -TShopModuleArticlelistFilterLastViewed,"* return the base of the query. overwrite this method for each filter to add custom filtering - * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... - * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) - * NOTE 2: the query will automatically be restricted to all active articles. - * NOTE 3: you query must include a where statement. - * - * @param TdbShopModuleArticleList $oListConfig - * - * @return string","public function _AllowCache() - { - return false; - }" -TShopModuleArticlelistFilterNoticeList,"* return the base of the query. overwrite this method for each filter to add custom filtering - * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... - * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) - * NOTE 2: the query will automatically be restricted to all active articles. - * NOTE 3: you query must include a where statement. - * - * @param TdbShopModuleArticleList $oListConfig - * - * @return string","public function _AllowCache() - { - return false; - }" -TShopModuleArticlelistFilterRelatedArticles,"* return the base of the query. overwrite this method for each filter to add custom filtering - * the method should include a query of the form select shop_article.*,... FROM shop_article ... WHERE ... - * NOTE: do not add order info or limit the query (overwrite GetListQueryOrderBy and GetListQueryLimit instead) - * NOTE 2: the query will automatically be restricted to all active articles. - * NOTE 3: you query must include a where statement. - * - * @param TdbShopModuleArticleList $oListConfig - * - * @return string","public function _GetCacheParameters() - { - $aParams = parent::_GetCacheParameters(); - $oShop = TdbShop::GetInstance(); - - $oActiveArticle = $oShop->GetActiveItem(); - if (!is_null($oActiveArticle)) { - $aParams['articleId'] = $oActiveArticle->id; - }" -TShopModuleArticlelistFilterSearch,* @var bool,"public function PreventUseOfParentObjectWhenNoRecordsAreFound() - { - return true; - }" -TShopModuleArticlelistFilterSearch,"* prevent the use of the parent object when this filter finds not articles. - * - * @return bool","public function _AllowCache() - { - return false; - }" -TShopModuleArticlelistFilterSearch,* @return bool,"public function ModuleInitHook() - { - parent::ModuleInitHook(); - $oShop = TdbShop::GetInstance(); - if ($oShop->fieldRedirectToNotFoundPageProductSearchOnNoResults) { - /** - * in this case the shop may redirect after running the search. since this occurs in the Execute of the - * module, we need to prevent any other output from being auto-sent to the browser - * @psalm-suppress UndefinedInterfaceMethod - * @FIXME Method `SetBlockAutoFlushToBrowser` only exist on a single implementation of the interface - */ - TGlobal::GetController()->SetBlockAutoFlushToBrowser(true); - }" -TShopModuleArticlelistFilterSearchFallbackAll,"* prevent the use of the parent object when this filter finds not articles. - * - * @return bool","public function PreventUseOfParentObjectWhenNoRecordsAreFound() - { - return $this->getHasSearch(); - }" -TShopModuleArticlelistFilterSearchFallbackAll,"* optional allows you to specify a list filter, that will be used instead, if this list filter has 0 matches. - * if set, then this will overwrite, returns the parent as default - * note: this will only be called if PreventUseOfParentObjectWhenNoRecordsAreFound returns false. - * - * @return TdbShopModuleArticleListFilter|null","public function getFallbackListFilter() - { - $aFilterData = $this->sqlData; - /** @var TdbShopModuleArticleListFilter $oFilterObject */ - $oFilterObject = new TShopModuleArticlelistFilterAllArticles(); - $oFilterObject->LoadFromRow($aFilterData); - - return $oFilterObject; - }" -TShopOrderStep,"* definiert einen Bestellschritt. -/*","public function Init() - { - $basket = $this->getShopService()->getActiveBasket(); - $basket->aCompletedOrderStepList[$this->fieldSystemname] = false; - $this->CheckBasketContents(); - - if (false === $this->AllowAccessToStep(true)) { - $this->JumpToStep($this->GetPreviousStep()); - }" -TShopOrderStep,"* is used to mark the current active step within step lists. - * - * @var bool","public function IsActive() - { - return true; - }" -TShopOrderStep,"* Called from the init method of the calling module. - * Visitor permissions for the requested step may be checked and the user redirected. - * - * @return void","public function AllowAccessToStepPublic() - { - return $this->AllowAccessToStep(); - }" -TShopOrderStep,"* Returns if the step is active and included in the order process. - * - * @return bool","public function JumpToStep(TdbShopOrderStep $oStep) - { - $_SESSION[self::SESSION_KEY_NAME] = $this->fieldSystemname; - $statusCode = 'POST' === $this->getRequest()->getMethod() ? Response::HTTP_SEE_OTHER : Response::HTTP_FOUND; - $this->getRedirect()->redirect($this->getOrderStepPageService()->getLinkToOrderStepPageRelative($oStep), $statusCode); - }" -TShopOrderStep,"* Returns if the user is allowed to view the requested step. - * - * @param bool $bRedirectToPreviousPermittedStep - * - * @return bool","public function GetStepURL($bDisableAccessCheck = true, $bForcePortalLink = false, $aAdditionalParameter = array()) - { - $sOrderPage = ''; - if ($bDisableAccessCheck || $this->AllowAccessToStep()) { - if ($bForcePortalLink) { - $sOrderPage = $this->getOrderStepPageService()->getLinkToOrderStepPageAbsolute($this, $aAdditionalParameter); - }" -TShopOrderStep,"* Method added to provide public access to the AllowAccessToStep method. - * - * @return bool","public function GetStepURLReturnStepViaAjax($bDisableAccessCheck = true, $bForcePortalLink = false, $aAdditionalParameter = array()) - { - $oGlobal = TGlobal::instance(); - $aAdditionalParameter['module_fnc'] = array($oGlobal->GetExecutingModulePointer()->sModuleSpotName => 'ExecuteAjaxCall'); - $aAdditionalParameter['_fnc'] = 'GetStepAsAjax'; - $aAdditionalParameter['sStepName'] = $this->fieldSystemname; - - return $this->GetStepURL($bDisableAccessCheck, $bForcePortalLink, $aAdditionalParameter); - }" -TShopOrderStep,"* Redirects back to the basket if basket is currently empty. - * - * @return void","public function ExecuteStep() - { - if ($this->ProcessStep()) { - $this->ProcessStepSuccessHook(); - $oBasket = TShopBasket::GetInstance(); - $oBasket->aCompletedOrderStepList[$this->fieldSystemname] = true; - $oNextStep = $this->GetNextStep(); - $this->JumpToStep($oNextStep); - }" -TShopOrderStep,"* Returns the step with the systemname $sStepName (language id is taken form the active page object). - * - * @param string $sStepName - * - * @return TdbShopOrderStep|null","public function GetNextStep() - { - static $oNextStep; - if (!$oNextStep) { - $oNextStep = TdbShopOrderStepList::GetNextStep($this); - }" -TShopOrderStep,@var TdbShopOrderStep $oStep,"public function AllowedMethods() - { - return array('ExecuteStep'); - }" -TShopOrderStep,@var $oStepData TdbShopOrderStep,"public function GetHtmlHeadIncludes() - { - return array(); - }" -TShopOrderStep,"* @param string|array|null $sData - either the id of the object to load, or the row with which the instance should be initialized - * @param string|null $sLanguage - init with the language passed - * @return TdbShopOrderStep","public function GetHtmlFooterIncludes() - { - return array(); - }" -TShopOrderStep,"* @param TShopBasket $basket - * @param string $classList comma seperated list of class names - * - * @return TdbShopOrderStep|null","public function GetDescription() - { - return $this->GetTextField('description', 600, true, $this->GetDescriptionVariables()); - }" -TShopOrderStep,@var TdbShopOrderStep $classObject,"public function Render($sSpotName = null, $aCallTimeVars = array()) - { - $oView = new TViewParser(); - - $oView->AddVar('oShop', $this->getShopService()->getActiveShop()); - $oView->AddVar('oStep', $this); - - $oStepNext = $this->GetNextStep(); - $oStepPrevious = $this->GetPreviousStep(); - $oView->AddVar('oStepNext', $oStepNext); - $oView->AddVar('oStepPrevious', $oStepPrevious); - - $sBackLink = $this->GetReturnToLastStepURL(); - $oView->AddVar('sBackLink', $sBackLink); - - $oView->AddVar('sSpotName', $sSpotName); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - - $sViewName = $this->GetRenderViewName(); - $sViewType = $this->GetRenderViewType(); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, $this->getStepViewPath(), $sViewType); - }" -TShopOrderStepList,* the order step list should allow caching of the steps.,"public function __construct() - { - parent::__construct(); - $this->bAllowItemCache = true; - }" -TShopOrderStepList,"* return the next step in line (null if there no other step). - * - * @param TdbShopOrderStep $oStep - * - * @return TdbShopOrderStep|null","public function GetActiveStepPosition() - { - $iActivePos = false; - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - $iStepNumber = 0; - while ($oItem = $this->Next()) { - ++$iStepNumber; - if ($oItem->bIsTheActiveStep) { - $iActivePos = $iStepNumber; - }" -TShopOrderStepList,@var TdbShopOrderStep $oNextStep,"public function Render($sViewName = 'navi', $sViewType = 'Core', $sSpotName = null, $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oView->AddVar('oSteps', $this); - - $oShop = TdbShop::GetInstance(); - $oView->AddVar('oShop', $oShop); - $oView->AddVar('sSpotName', $sSpotName); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopStepBasketCore,"* show the current basket. -/*","public function JumpToWrapping() - { - // Not yet implemented - }" -TShopStepBasketCore,"* redirects the user to the wrapping step. - * - * @return void","public function AllowedMethods() - { - $externalFunctions = parent::AllowedMethods(); - $externalFunctions[] = 'UpdateBasket'; - - return $externalFunctions; - }" -TShopStepBasketCore,"* returns the link to the previous step (or false if there is none). - * - * @return string","public function GetNextStep() - { - static $oNextStep; - if (!$oNextStep) { - $oUsers = TdbDataExtranetUser::GetInstance(); - if ($oUsers->IsLoggedIn() && $oUsers->HasData()) { - $oBasket = TShopBasket::GetInstance(); - $oBasket->aCompletedOrderStepList['user'] = true; - // now search for the next step not marked as completed - $oStepList = TdbShopOrderStepList::GetList(); - $oStepList->bAllowItemCache = true; - $oNextStep = null; - $bDone = false; - // do not allow access to the last stpe - $iNumItems = $oStepList->Length(); - while (($iNumItems > 0) && !$bDone && ($oTmpStep = $oStepList->Next())) { - --$iNumItems; - if (!$oTmpStep->AllowAccessToStepPublic()) { - // step not completed... - $bDone = true; - }" -TShopStepBasketCore,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function UpdateBasket($bInternalCall = false) - { - // we use the existing basket module to do all the work... - $oShop = TdbShop::GetInstance(); - $oController = TGlobal::GetController(); - $oBasketModule = $oController->moduleLoader->GetPointerToModule($oShop->fieldBasketSpotName); - $bSuccess = $oBasketModule->UpdateBasketItems(null, false, true); - - // redirect to current page - if (!$bInternalCall) { - $this->ReloadCurrentStep(); - }" -TShopStepConfirmCore,"* method is called from the init method of the calling module. here you can check - * if the step may be viewed, and redirect to another step if the user does not have permission.","public function Init() - { - // check basket amount.. remove items that may not be ordered - $basket = $this->getShopService()->getActiveBasket(); - $global = TGlobal::instance(); - $basket->ValidateBasketContents($global->GetExecutingModulePointer()->sModuleSpotName); - parent::Init(); - }" -TShopStepConfirmCore,"* returns true if the user may view the step. - * - * @param bool $bRedirectToPreviousPermittedStep - * - * @return bool","public function AllowedMethods() - { - $externalFunctions = parent::AllowedMethods(); - if (!is_array($externalFunctions)) { - $externalFunctions = array(); - }" -TShopStepConfirmCore,"* define any methods of the class that may be called via get or post. - * - * @return array","public function ConfirmRemotePayment() - { - $oGlobal = TGlobal::instance(); - $oActivePage = $this->getActivePageService()->getActivePage(); - $sErrorCode = $oGlobal->GetUserData('ERRORCODE'); - $this->SaveInExportLog(); - if (empty($sErrorCode)) { - $sUrl = $oActivePage->GetRealURLPlain(array('module_fnc' => array('spota' => 'ExecuteStep'), 'aInput' => array('agb' => 'true')), true); - }" -TShopStepOrderCompletedCore,"* we deactivate the basket step... after all, at this point, it has been reset. - * - * @return void","public function Render($sSpotName = null, $aCallTimeVars = array()) - { - $oUser = TdbDataExtranetUser::GetInstance(); - if (!is_null($oUser->fieldName) && !$oUser->IsLoggedIn()) { - $this->SetLastUserBoughtToSession($oUser); - }" -TShopStepOrderCompletedCore,"* returns true if the user may view the step. - * - * @param bool $bRedirectToPreviousPermittedStep - * - * @return bool","public function GetLastUserBoughtFromSession() - { - $oLastUserBought = null; - if (array_key_exists('sLastUserBought', $_SESSION)) { - $oLastUserBought = $_SESSION['sLastUserBought']; - }" -TShopStepOrderCompletedCore,"* method should return any variables that should be replaced in the description field. - * - * @return array","public function RemoveLastUserBoughtFromSession() - { - if (array_key_exists('sLastUserBought', $_SESSION)) { - unset($_SESSION['sLastUserBought']); - }" -TShopStepShippingCore,"* the selected shipping group. - * - * @var TdbShopShippingGroup","public function Init() - { - parent::Init(); - $inputFilterUtil = $this->getInputFilterUtil(); - - /** @var array|null $shippingData */ - $shippingData = $inputFilterUtil->getFilteredPostInput('aShipping'); - if (null !== $shippingData) { - $this->aRequestData = $shippingData; - if (!is_array($this->aRequestData)) { - $this->aRequestData = array(); - }" -TShopStepShippingCore,"* selected payment group. - * - * @var TdbShopPaymentMethod","public function ChangeShippingGroup() - { - $oBasket = TShopBasket::GetInstance(); - $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup(); - // check if the group is still valid. if not, reload using default - if (!$this->oActiveShippingGroup || false == $this->oActiveShippingGroup->IsAvailable()) { - $oBasket->SetActiveShippingGroup(null); - $oBasket->SetBasketRecalculationFlag(true); - $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup(); - }" -TShopStepShippingCore,* @var array,"public function AllowedMethods() - { - $aExternalFunctions = parent::AllowedMethods(); - if (!is_array($aExternalFunctions)) { - $aExternalFunctions = array(); - }" -TShopStepShippingCore,"* method is called from the init method of the calling module. here you can check - * if the step may be viewed, and redirect to another step if the user does not have permission.","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - - if (isset($this->oActiveShippingGroup)) { - $oPaymentMethodList = TShopBasket::GetInstance()->GetAvailablePaymentMethods(); - if ($oPaymentMethodList) { - while ($oPaymentMethod = $oPaymentMethodList->Next()) { - $oPaymentHandler = $oPaymentMethod->GetFieldShopPaymentHandler(); - - if (method_exists($oPaymentHandler, 'GetHtmlHeadIncludes')) { - $aAdditionalIncludes = $oPaymentHandler->GetHtmlHeadIncludes(); - if (count($aAdditionalIncludes) > 0) { - $aIncludes = array_merge($aIncludes, $aAdditionalIncludes); - }" -TShopStepUserDataCore,"* @deprecated - you should use TShopStepUserDataV2 instead -/*","public function Init() - { - parent::Init(); - $oUser = TdbDataExtranetUser::GetInstance(); - if ($oUser->IsLoggedIn()) { - $oBasket = TShopBasket::GetInstance(); - $oBasket->aCompletedOrderStepList[$this->fieldSystemname] = true; - }" -TShopStepUserDataCore,@var bool,"public function AllowedMethods() - { - $externalFunctions = parent::AllowedMethods(); - $externalFunctions[] = 'ShowShippingAddressInput'; - $externalFunctions[] = 'HideShippingAddressInput'; - - $externalFunctions[] = 'UpdateUser'; - $externalFunctions[] = 'Register'; - $externalFunctions[] = 'UpdateUserAddress'; - $externalFunctions[] = 'Login'; - - $externalFunctions[] = 'SelectBillingAddress'; - $externalFunctions[] = 'SelectShippingAddress'; - $externalFunctions[] = 'DeleteShippingAddress'; - - return $externalFunctions; - }" -TShopStepUserDataCore,@var TdbPkgNewsletterUser|null,"public function UpdateUser() - { - $this->CallExtranetModuleMethod('UpdateUser'); - }" -TShopStepUserDataCore,"* returns true if the user may view the step. - * - * @param bool $bRedirectToPreviousPermittedStep - * - * @return bool","public function Register() - { - $this->CallExtranetModuleMethod('Register'); - }" -TShopStepUserDataCore,"* method is called from the init method of the calling module. here you can check - * if the step may be viewed, and redirect to another step if the user does not have permission.","public function UpdateUserAddress() - { - $this->CallExtranetModuleMethod('UpdateUserAddress'); - }" -TShopStepUserDataCore,"* @param bool $bState - * - * @return void","public function Login() - { - $this->CallExtranetModuleMethod('Login'); - }" -TShopStepUserDataCore,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function SelectBillingAddress() - { - $this->CallExtranetModuleMethod('SelectBillingAddress'); - }" -TShopStepUserDataCore,"* define any methods of the class that may be called via get or post. - * - * @return array","public function SelectShippingAddress() - { - $this->CallExtranetModuleMethod('SelectShippingAddress'); - }" -TShopStepUserDataCore,* @return void,"public function DeleteShippingAddress() - { - $this->CallExtranetModuleMethod('DeleteShippingAddress'); - }" -TShopStepUserDataCore,* @return void,"public function ShowShippingAddressInput() - { - $this->SetShowShippingAddressInputState(true); - $this->ProcessStep(true); - }" -TShopStepUserDataCore,* @return void,"public function HideShippingAddressInput() - { - $this->SetShowShippingAddressInputState(false); - $this->ProcessStep(true); - }" -via,"* ChangeShipToBillingState - pass a non empty value if you are only changing the state of ship to billing or not - * (this will prevent the method from validating and executing the form. - * - * - * the step can operate in three modes: a) register a new user, b) edit an existing user, c) shop as guest - * which state is active can be checked via TShopStepUserDataV2::GetUserMode(). - * you can change the state by calling TShopStepUserDataV2::SetUserMode($sMode) - * the data is stored in session and the methods static so you can call them from other steps - * - * you may also use this step in combination with TShopStepLogin - which will set the mode based on the user selection - * - * - * IMPORTANT: you should always access the class via ""TShopStepUserDataV2"" (the virtual class entry point) - * IMPORTANT2: this is a replacement of TShopStepUserDataCore - it is recommended using this newer version -/*","public function AllowedMethods() - { - $aExternalFunctions = parent::AllowedMethods(); - $aExternalFunctions[] = 'ChangeSelectedAddress'; - - return $aExternalFunctions; - }" -via,"* holds the user data passed to the form. default. use the Get* and Set* methods to change/read contents from the array - * do not access it directly! - * - * @var array","public function Init() - { - parent::Init(); - - $this->bUserDataSubmission = false; - - $this->InitUserData(); - - // primary address should be initialized first - if (TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING == $this->AddressUsedAsPrimaryAddress()) { - $this->InitShippingAddress(); - $this->InitBillingAddress(); - }" -via,"* set to true if the parameter ChangeShipToBillingState is past with any none-empty value via get/post - * use IsChangeShipToBillingStateRequest() to check if this is the case. - * - * @var bool","public function ChangeSelectedAddress() - { - $this->SetPreventProcessStepMethodFromExecuting(true); - // the method only works if the user is logged in - $oUser = self::getExtranetUserProvider()->getActiveUser(); - if ($oUser->IsLoggedIn()) { - /** @var string $sNewShippingAddressId */ - $sNewShippingAddressId = $this->GetShippingAddressData('selectedAddressId'); - /** @var string $sNewBillingAddressId */ - $sNewBillingAddressId = $this->GetBillingAddressData('selectedAddressId'); - - if ('1' == $this->GetShipToBillingAddress()) { - if (0 != strcmp($sNewBillingAddressId, $sNewShippingAddressId)) { - if (TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING == $this->AddressUsedAsPrimaryAddress()) { - $sNewShippingAddressId = $sNewBillingAddressId; - }" -TShopStepWrappingCore,"* returns true if the user may view the step. - * - * @param bool $bRedirectToPreviousPermittedStep - * - * @return bool","public function IsActive() - { - $bIsActive = $this->GetFromInternalCache('bIsActive'); - if (null === $bIsActive) { - $bIsActive = parent::IsActive(); - if ($bIsActive) { - // wrapping only if wrapping is set - $bIsActive = false; - $oWrapping = TdbShopWrappingList::GetList(); - if ($oWrapping->Length() > 0) { - $bIsActive = true; - }" -TShopPaymentHandler,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right - * information is collected from the user, and that the payment is executed (as may be the case for online payment) - * Note that the default handler has no functionality. it must be extended in order to do anything useful. -/*","public function GetUserInputTargetURL() - { - return ''; - }" -TShopPaymentHandler,* @var IPkgShopOrderPaymentConfig,"public function SetOwningPaymentMethodId($sPaymentMethodId) - { - $this->sOwningPaymentMethodId = $sPaymentMethodId; - }" -TShopPaymentHandler,"* user data for payment. - * - * @var array","public function SetPaymentUserData($aPaymentUserData) - { - $this->aPaymentUserData = $aPaymentUserData; - }" -TShopPaymentHandler,"* set by the payment method using this handler. access the property using the getter and setter for it. - * - * @var string","public function GetHtmlHeadIncludes() - { - return array(); - }" -TShopPaymentHandler,"* return the URL to which the user input is send. using this method you can redirect the input - * to go directly to, for example, the payment provider. if you return an empty string, the default target (ie the payment - * data entry step) will be used - * Important: for this method to have any affect, you will need to make sure that each payment method has its - * own form in the view. - * - * @return string","public function ShowNextStepbutton() - { - return true; - }" -TShopPaymentHandler,"* set the owning payment method. - * - * @param string $sPaymentMethodId - * - * @return void","public function setConfigData(IPkgShopOrderPaymentConfig $configData) - { - $this->configData = $configData; - }" -TShopPaymentHandler,"* getter for the owning payment method. - * - * @return string|null","public function GetConfigParameter($sParameterName) - { - if (null === $this->configData) { - throw new ConfigurationException('Payment handler is not configured. Please do only initialize a payment handler through the ShopPaymentHandlerFactory'); - }" -TShopPaymentHandler,"* return an instance of the correct class type for the filter identified by $id - * Do not call this method directly. Instead use the service chameleon_system_shop.payment.handler_factory to - * create payment handlers. - * - * @param int $id - * - * @return TdbShopPaymentHandler|null","public function getEnvironment() - { - return $this->configData->getEnvironment(); - }" -TShopPaymentHandler,"* @param array $row - * @param string|null $languageId - * - * @return TdbShopPaymentHandler","public function GetFieldShopPaymentHandlerParameterList() - { - $oList = TdbShopPaymentHandlerParameterList::GetListForShopPaymentHandlerId($this->id, $this->iLanguageId); - $oList->ChangeOrderBy(array('cms_portal_id' => 'ASC')); //make sure parameters without portal come first - return $oList; - }" -TShopPaymentHandler,* @var $instance TdbShopPaymentHandler,"public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - return true; - }" -TShopPaymentHandler,"* allows you to overwrite the payment data - use it when, for example, you load - * the payment handler for an order. - * - * @param array $aPaymentUserData - assoc array of the parameter - * - * @return void","public function PostExecutePaymentHook(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = true; - $aData = $oOrder->sqlData; - $aData['system_order_payment_method_executed'] = '1'; - $aData['system_order_payment_method_executed_date'] = date('Y-m-d H:i:s'); - $oOrder->LoadFromRow($aData); - $oOrder->AllowEditByAll(true); - $oOrder->Save(); - - return $bPaymentOk; - }" -TShopPaymentHandler,"* html head includes to use in the shipping step if the payment method is available. - * - * @return string[]","public function postExecutePaymentInterruptedHook(TdbShopOrder $oOrder, $sMessageConsumer) - { - return true; - }" -TShopPaymentHandler,* @return bool,"public function ValidateUserInput() - { - $this->GetUserPaymentData(); // load user data... - // then validate... - - return true; - }" -TShopPaymentHandler,* @return IPkgShopOrderPaymentConfig,"public function SaveUserPaymentDataToOrder($iOrderId) - { - $aUserPaymentData = $this->GetUserPaymentData(); - $aUserPaymentData = $this->PreSaveUserPaymentDataToOrderHook($aUserPaymentData); - if (is_array($aUserPaymentData)) { - $query = ""DELETE FROM `shop_order_payment_method_parameter` WHERE `shop_order_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($iOrderId).""'""; - MySqlLegacySupport::getInstance()->query($query); - foreach ($aUserPaymentData as $keyId => $keyVal) { - $oPaymentParameter = TdbShopOrderPaymentMethodParameter::GetNewInstance(); - /** @var $oPaymentParameter TdbShopOrderPaymentMethodParameter */ - $aTmpData = array('shop_order_id' => $iOrderId, 'name' => $keyId, 'value' => $keyVal); - $oPaymentParameter->AllowEditByAll(true); - $oPaymentParameter->LoadFromRow($aTmpData); - $oPaymentParameter->Save(); - }" -TShopPaymentHandler,"* @param IPkgShopOrderPaymentConfig $configData - * - * @return void","public function GetUserPaymentDataItem($sItemName) - { - $aPaymentData = $this->GetUserPaymentData(); - $sReturn = false; - if (is_array($aPaymentData) && isset($aPaymentData[$sItemName])) { - $sReturn = $aPaymentData[$sItemName]; - }" -TShopPaymentHandler,"* return a config parameter for the payment handler. - * - * @param string $sParameterName - the system name of the handler - * - * @return string|false - * - * @throws ConfigurationException","public function GetUserPaymentDataWithoutLoading() - { - return $this->aPaymentUserData; - }" -TShopPaymentHandler,* @return string,"public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - - $oShop = TdbShop::GetInstance(); - $oView->AddVar('oShop', $oShop); - $oView->AddVar('oPaymentHandler', $this); - - $aUserPaymentData = $this->GetUserPaymentData(); - $oView->AddVar('aUserPaymentData', $aUserPaymentData); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, $this->GetViewPath(), $sViewType); - }" -TShopPaymentHandler,* @return TdbShopPaymentHandlerParameterList,"public function PostSelectPaymentHook($sMessageConsumer) - { - return true; - }" -TShopPaymentHandler,"* Executes payment for an order. This method is called when the user confirmed the order. - * If you need to transfer control to an external process (as may be required for 3d secure), use - * self::SetExecutePaymentInterrupt(true) before passing control. This tells the shop to continue order execution - * as soon as control is passed back to it. (Chameleon will call $this->PostExecutePaymentHook() as soon as control - * is returned - this is where you should check if the returned data is valid/invalid. - * - * @param TdbShopOrder $oOrder - * @param string $sMessageConsumer - send error messages here - * - * @return bool true if the payment was executed successfully, else false","public function PostProcessExternalPaymentHandlerHook() - { - return true; - }" -TShopPaymentHandler,"* Set the ExecutePaymentInterrupt. If it is set to active, then the next request to the - * basket page will auto. - * - * @param bool $bActive - * - * @return void","public function AllowUse(TdbShopPaymentMethod $oPaymentMethod) - { - return true; - }" -TShopPaymentHandler,"* return true if the ExecutePayment was interrupted and needs to be continued... - * - * @return bool","public function GetExternalPaymentReferenceIdentifier() - { - return ''; - }" -TShopPaymentHandler,"* The method is called from TShopBasket AFTER ExecutePayment was successfully executed. - * The method is ALSO called, if the payment handler passed execution to an external service from within the ExecutePayment - * Method. Note: if you return false, then the system will return to the called order step and the - * order will be cancled (shop_order.canceled = 1) - the article stock will be returned. - * - * if you return true, then the order is marked as paid. - * - * Note: system_order_payment_method_executed will be set to true either way - * - * @param TdbShopOrder $oOrder - * @param string $sMessageConsumer - send error messages here - * - * @return bool","public function GetExternalPaymentTypeIdentifier() - { - return ''; - }" -TShopPaymentHandler,"* method is called only if the user returns from an execute payment call that was interrupted. this is called before - * PostExecutePaymentHook. If the method returns false, or if an exception is thrown, then the order is canceled. - * - * @param TdbShopOrder $oOrder - * @param string $sMessageConsumer - * - * @throws TPkgCmsException_LogAndMessage - * - * @return bool","public function BeforeJumpToThankYouStepAfterInterruptedPaymentHook() - { - }" -TShopPaymentHandler,"* return true if the user data is valid - * data is loaded from GetUserPaymentData(). - * - * @return bool","public function OnPaymentErrorAfterInterruptedPaymentHook() - { - }" -TShopPaymentHandler,"* store user payment data in order. - * - * @param int $iOrderId - * - * @return void","public function isBlockForUserSelection() - { - return $this->fieldBlockUserSelection; - }" -TShopPaymentHandlerCreditCard,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right - * information is collected from the user, and that the payment is executed (as may be the case for online payment) - * Note that the default handler has no functionality. it must be extended in order to do anything usefull. -/*","public function ValidateUserInput() - { - $bIsValid = parent::ValidateUserInput(); - - if ($bIsValid) { - $oMsgManager = TCMSMessageManager::GetInstance(); - - $aDefaultVals = $this->GetDefaultUserPaymentData(); - - foreach (array_keys($aDefaultVals) as $sField) { - if (!array_key_exists($sField, $this->aPaymentUserData) || empty($this->aPaymentUserData[$sField])) { - $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-'.$sField, 'ERROR-USER-REQUIRED-FIELD-MISSING'); - $bIsValid = false; - }" -TShopPaymentHandlerCreditCard,"* return the default payment data for the handler. - * - * @return array","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = true; - // run order.... - - return $bPaymentOk; - }" -TShopPaymentHandlerCreditCard,"* return true if the user data is valid - * data will be passed as an array. - * - * @param array $aUserData - the user data - * - * @return bool","public function SaveUserPaymentDataToOrder($iOrderId) - { - $aPayment = $this->aPaymentUserData; - $this->aPaymentUserData = array(); - - $this->aPaymentUserData['creditCardType'] = $aPayment['creditCardType']; - $this->aPaymentUserData['creditCardNumber'] = str_pad(substr($aPayment['creditCardNumber'], 0, 4), 10, '*'); - $this->aPaymentUserData['creditCardOwnerName'] = $aPayment['creditCardOwnerName']; - $this->aPaymentUserData['creditCardValidToMonth'] = $aPayment['creditCardValidToMonth']; - $this->aPaymentUserData['creditCardValidToYear'] = $aPayment['creditCardValidToYear']; - $this->aPaymentUserData['creditCardChecksum'] = '***'; - - parent::SaveUserPaymentDataToOrder($iOrderId); - - $this->aPaymentUserData = $aPayment; - }" -for,"* This is the base class for DataTrans Paymenthandler. If you want to add a new payment method. -/*","public function PostSelectPaymentHook($sMessageConsumer) - { - $bContinue = parent::PostSelectPaymentHook($sMessageConsumer); - $this->sTransactionId = false; - if (true == $bContinue) { - $bContinue = $this->CheckAuthorisationResponse(); - }" -for,"* Transaction id for DataTrans authorisation. Needed for settlement authorised transactions. - * - * @var bool|string","public function GetMsgManagerName() - { - return ''; - }" -for,"* Reference number for each authorisation. Was set after redirecting from DataTrans. - * Reference number has to be a unique for each authorisation. - * Reference number was build with crc32 from basket identifier__payment type identifier__count - * Count was needed because the first to parts are not unique. - * - * @var false|int","public function GetPaymentType() - { - return ''; - }" -for,"* Count for reference number. - * To Get the reference number unique we add this count at the end. - * - * @var int","public function GetUserInputTargetURL() - { - return $this->GetTestLiveModeParameter('payment_url'); - }" -for,"* Was set after authorisation with the authorised amount. - * Was used on create order to check if amount has changed. - * - * @var bool","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = parent::ExecutePayment($oOrder); - if ($bPaymentOk) { - if ($oOrder->fieldValueTotal * 100 == $this->sAuthorisedAmount) { - $bPaymentOk = $this->ExecuteDataTransPaymentCall($oOrder); - }" -TShopPaymentHandlerDataTrans_CreditCard,* constant for class specific error messages.,"public function GetMsgManagerName() - { - return self::MSG_MANAGER_NAME; - }" -TShopPaymentHandlerDataTrans_CreditCard,* constant for class specific payment type.,"public function GetPaymentType() - { - return self::PAYMENT_TYPE; - }" -TShopPaymentHandlerDataTrans_SwissPostFinance,* constant for class specific error messages.,"public function GetMsgManagerName() - { - return self::MSG_MANAGER_NAME; - }" -TShopPaymentHandlerDataTrans_SwissPostFinance,* constant for class specific payment type.,"public function GetPaymentType() - { - return self::PAYMENT_TYPE; - }" -TShopPaymentHandlerDataTrans_SwissPostFinance,* constant for class specific payment reference id.,"public function AllowUse(TdbShopPaymentMethod $oPaymentMethod) - { - $bAllowUse = parent::AllowUse($oPaymentMethod); - if ($bAllowUse) { - if (preg_match('/Chrome/i', $_SERVER['HTTP_USER_AGENT']) || preg_match('/Opera/i', $_SERVER['HTTP_USER_AGENT'])) { - $bAllowUse = false; - }" -TShopPaymentHandlerDebit,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right - * information is collected from the user, and that the payment is executed (as may be the case for online payment) - * Note that the default handler has no functionality. it must be extended in order to do anything usefull. -/*","public function ValidateUserInput() - { - $bIsValid = parent::ValidateUserInput(); - - if ($bIsValid) { - $oMsgManager = TCMSMessageManager::GetInstance(); - $required = array('iban'); - if (!self::isGermanIBAN($this->aPaymentUserData['iban'])) { - $required[] = 'bic'; - }" -TShopPaymentHandlerDebit,"* return the default payment data for the handler. - * - * @return array","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = true; - // run order.... - - return $bPaymentOk; - }" -TShopPaymentHandlerDebitNoSEPA,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right - * information is collected from the user, and that the payment is executed (as may be the case for online payment) - * Note that the default handler has no functionality. it must be extended in order to do anything usefull. -/*","public function ValidateUserInput() - { - $bIsValid = parent::ValidateUserInput(); - - if ($bIsValid) { - $oMsgManager = TCMSMessageManager::GetInstance(); - - if (!array_key_exists('accountOwner', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountOwner'])) { - $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountOwner', 'ERROR-USER-REQUIRED-FIELD-MISSING'); - $bIsValid = false; - }" -TShopPaymentHandlerDebitNoSEPA,"* return the default payment data for the handler. - * - * @return array","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = true; - // run order.... - - return $bPaymentOk; - }" -TShopPaymentHandlerInvoice,"* the paymenthandlers are used to handle the different payment methods. They ensure that the right - * information is collected from the user, and that the payment is executed (as may be the case for online payment) - * Note that the default handler has no functionality. it must be extended in order to do anything usefull. -/*","public function SaveUserPaymentDataToOrder($iOrderId) - { - $this->aPaymentUserData = array(); - parent::SaveUserPaymentDataToOrder($iOrderId); - }" -TShopPaymentHandlerIPaymentEndPoint,"* don't use this Class to set up an payment handler because this call has only - * standard content. Use TShopPaymentHandlerIPaymentCreditCard or TShopPaymentHandlerIPaymentDebit instead.","public function PostSelectPaymentHook($sMessageConsumer) - { - $bContinue = parent::PostSelectPaymentHook($sMessageConsumer); - if (true == $bContinue) { - // we need a non empty sStorageId to continue - if (empty($this->sStorageId)) { - $bContinue = false; - }" -TShopPaymentHandlerIPaymentEndPoint,* constant for class specific error messages.,"public function GetUserInputTargetURL() - { - return $this->GetRequestURL(); - }" -TShopPaymentHandlerIPaymentEndPoint,* System sets constant to url that the system knows its a ipayment call.,"public function getRequestParameters() - { - $aViewVariables = array(); - - $aTmp = $this->GetAllInputFieldParameter(); - foreach (array_keys($aTmp) as $sTmpKey) { - $aViewVariables[$sTmpKey] = $aTmp[$sTmpKey]; - }" -TShopPaymentHandlerIPaymentEndPoint,"* id for saved payment data on ipayment server. - * - * @var string|false|null","public function PostProcessExternalPaymentHandlerHook() - { - $bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); - if ($bPaymentTransmitOk) { - $oGlobal = TGlobal::instance(); - $sStatus = $oGlobal->GetUserData('ret_status'); - if ('ERROR' == $sStatus) { - $this->SetErrorCodesFromResponseToMessageManager(); - $bPaymentTransmitOk = false; - }" -TShopPaymentHandlerIPaymentEndPoint,"* method is called after the user selected his payment and submitted the payment page - * return false if you want to send the user back to the payment selection page. - * - * DeuCS performs no processing at this step. we keep the overwritten function here only to clarity - * - * @param string $sMessageConsumer - the name of the message handler that can display messages if an error occurs (assuming you return false) - * - * @return bool","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = parent::ExecutePayment($oOrder); - if ($bPaymentOk) { - TdbShopPaymentHandler::SetExecutePaymentInterrupt(true); - /** - * @psalm-suppress NoValue - * @FIXME `ExecuteIPaymentCall` never returns since it redirects, there is no return value to track. - */ - $bPaymentOk = $this->ExecuteIPaymentCall($oOrder); - }" -TShopPaymentHandlerIPaymentEndPoint,"* return the URL to which the user input is send. using this method you can redirect the input - * to go directly to, for example, the payment provider. if you return an empty string, the default target (ie the payment - * data entry step) will be used. - * - * @return string","public function PostExecutePaymentHook(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = false; - $oGlobal = TGlobal::instance(); - - $aResult = $this->GetNeedeResponsePostParameterForSecurityCheck(); - $aResult['ret_status'] = $oGlobal->GetUserData('ret_status'); - $this->aPaymentUserData = $aResult; - $this->aPaymentUserData['sStorageId'] = $this->sStorageId; - $this->aPaymentUserData['aReturnPayload'] = print_r($this->aPaymentUserData, true); - $this->aPaymentUserData['bChameleonPaymentOk'] = '0'; - if (count($aResult) > 0 && array_key_exists('ret_status', $aResult) && 'SUCCESS' == $aResult['ret_status']) { - $bPaymentOk = true; - }" -TShopPaymentHandlerIPaymentEndPoint,"* Get path to view location. - * - * @return string","public function GetExternalPaymentReferenceIdentifier() - { - $sIdent = ''; - if (is_array($this->aPaymentUserData) && array_key_exists('ret_trx_number', $this->aPaymentUserData)) { - $sIdent = $this->aPaymentUserData['ret_trx_number']; - }" -TShopPaymentHandlerMontrada,@var string|null,"public function PostSelectPaymentHook($sMessageConsumer) - { - $bContinue = parent::PostSelectPaymentHook($sMessageConsumer); - if ($bContinue) { - $bContinue = $this->CallMontradaFormService($sMessageConsumer); - }" -TShopPaymentHandlerMontrada,"@var array|null","public function GetAnswerFromServer($aData, $sMessageConsumer) - { - $bSuccess = false; - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $this->GetConfigParameter('url')); - curl_setopt($ch, CURLOPT_VERBOSE, 1); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_HEADER, 1); - curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)'); - curl_setopt($ch, CURLOPT_REFERER, $_SERVER['REQUEST_URI']); - - $aParameter = array(); - foreach ($aData as $sKey => $sVal) { - if (!array_key_exists($sKey, $aParameter)) { - $aParameter[$sKey] = $sVal; - }" -TShopPaymentHandlerMontrada,"* method is called after the user selected his payment and submitted the payment page - * return false if you want to send the user back to the payment selection page. - * - * @param string $sMessageConsumer - the name of the message handler that can display messages if an error occurs (assuming you return false) - * - * @return bool","public function GetConfigParameter($sParameterName) - { - static $bUseSandbox = null; - if (is_null($bUseSandbox)) { - $bUseSandbox = (IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX === $this->getEnvironment()); - }" -TShopPaymentHandlerMontrada,"* return timestamp in a montrada usable format. - * - * @return string","public function PostProcessExternalPaymentHandlerHook() - { - $bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); - if ($bPaymentTransmitOk) { - $oGlobal = TGlobal::instance(); - $aUserData = $oGlobal->GetUserData(); - - // check if return data is ok... - $aReqFields = array('merchid', 'orderid', 'amount', 'currency', 'result', 'timestamp', 'psphash'); - foreach ($aReqFields as $sFieldName) { - $bPaymentTransmitOk = ($bPaymentTransmitOk && array_key_exists($sFieldName, $aUserData)); - }" -TShopPaymentHandlerMontrada,"* calculate request hash. - * - * @param array $aInput - * - * @return string","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = parent::ExecutePayment($oOrder); - - $aCommand = array('trefnum' => $this->sMontradaTransactionId, 'amount' => round($oOrder->fieldValueTotal * 100)); - $aAnswer = $this->ExecuteRequestCall('capture', $aCommand); - if (array_key_exists('rc', $aAnswer) && '000' == $aAnswer['rc']) { - $bPaymentOk = true; - // add the response data to the order - foreach ($aAnswer as $sKey => $sVal) { - if (!array_key_exists($sKey, $this->aPaymentUserData)) { - $this->aPaymentUserData[$sKey] = $sVal; - }" -TShopPaymentHandlerMontrada,"* calculate response hash. - * - * @param array $aInput - * - * @return string","public function ExecuteRequestCall($methodName, $aRequestString) - { - //setting the curl parameters. - $ch = curl_init(); - - $password = $this->GetConfigParameter('pwd'); - $username = $this->GetConfigParameter('userName'); - $url = $this->GetConfigParameter('sPoshCommandUrl'); - $aRequestString['command'] = $methodName; - $sRequestString = TTools::GetArrayAsURL($aRequestString); - $sRequestString = str_replace('&', '&', $sRequestString); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_FAILONERROR, 1); - - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); - - curl_setopt($ch, CURLOPT_USERPWD, ""$username:$password""); - curl_setopt($ch, CURLOPT_POSTFIELDS, $sRequestString); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - - curl_setopt($ch, CURLOPT_POST, 1); - - //if USE_PROXY constant set to TRUE in Constants.php, then only proxy will be enabled. - //Set proxy name to PROXY_HOST and port number to PROXY_PORT in constants.php - // curl_setopt ($ch, CURLOPT_PROXY, PROXY_HOST."":"".PROXY_PORT); - - //getting response from server - $response = curl_exec($ch); - $aResponse = $this->ExtractResponse($response); - - $sError = curl_error($ch); - $sErrorNr = curl_errno($ch); - - if ($sErrorNr) { - // moving to display page to display curl errors - // $_SESSION['curl_error_no']=curl_errno($ch) ; - // $_SESSION['curl_error_msg']=curl_error($ch); - // $location = ""APIError.php""; - // header(""Location: $location""); - }" -TShopPaymentHandlerMontrada,"* return the URL to the montrada form service. - * - * @param string $sMessageConsumer - the name of the message handler that can display messages if an error occurs (assuming you return false) - * - * @return bool","public function ExtractResponse($nvpstr) - { - $intial = 0; - $nvpArray = array(); - - while (strlen($nvpstr)) { - //postion of Key - $keypos = strpos($nvpstr, '='); - //position of value - $valuepos = strpos($nvpstr, '&') ? strpos($nvpstr, '&') : strlen($nvpstr); - - /*getting the Key and Value values and storing in a Associative Array*/ - $keyval = substr($nvpstr, $intial, $keypos); - $valval = substr($nvpstr, $keypos + 1, $valuepos - $keypos - 1); - //decoding the respose - $nvpArray[urldecode($keyval)] = urldecode($valval); - $nvpstr = substr($nvpstr, $valuepos + 1, strlen($nvpstr)); - }" -TShopPaymentHandlerMontrada,"* Send Call per POST to montrada. Response is a moved permanently header which we pass through. - * - * @param array $aData - the post data to be send to montrada - * @param string $sMessageConsumer - * - * @return bool","public function GetExternalPaymentReferenceIdentifier() - { - $sIdent = ''; - if (is_array($this->aPaymentUserData) && array_key_exists('trefnum', $this->aPaymentUserData)) { - $sIdent = $this->aPaymentUserData['trefnum']; - }" -TShopPaymentHandlerOgone,"* executes payment for order. this method is called, wenn the user confirmed the - * order. if you need to transfer controll to an external process (as may be required for 3d secure) - * then you can use self::SetExecutePaymentInterrupt(true) before passing controll. this tells - * the shop to continue order execution as soon as controll is passed back to it. (chameleon will - * call $this->PostExecutePaymentHook() as soon as controll is returned - this is where you should - * check if the data returnd is valid/invalid. - * - * Redirect to ogone payment service - * - * @param TdbShopOrder $oOrder - * @param string $sMessageConsumer - send error messages here - * - * @return bool","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - TTools::WriteLogEntry('In ExecutePayment Ogone for order id '.$oOrder->id."" (nr: {$oOrder->fieldOrdernumber}" -TShopPaymentHandlerOgone,"* return url to ogone payment service with all needed parameter. - * - * @param TdbShopOrder $oOrder - * - * @return string","public function PostExecutePaymentHook(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = parent::PostExecutePaymentHook($oOrder, $sMessageConsumer); - if ($bPaymentOk) { - $oGlobal = TGlobal::instance(); - $sPaymentStatus = false; - if ($oGlobal->UserDataExists('STATUS')) { - $sPaymentStatus = $oGlobal->GetUserData('STATUS'); - }" -TShopPaymentHandlerOgoneAliasGateway,* @return string,"public function ValidateUserInput() - { - $bValid = parent::ValidateUserInput(); - - $bValid = ($bValid && $this->CheckIncomingHash(TGlobal::instance()->GetUserData())); - - return $bValid; - }" -TShopPaymentHandlerOgoneBase,"* !!!ATTENTION: This never worked as expected, so if you want to use PayPal with OGONE, you have to work on this. - * -/*","public function HandleNotifyMessage($aParameter) - { - TTools::WriteLogEntry('OGONE: handle notify message: '.print_r($aParameter, true), 1, __FILE__, __LINE__); - if ($this->CheckIncomingHash($aParameter)) { - $aParameter = array_change_key_case($aParameter, CASE_UPPER); - $oOrder = TdbShopOrder::GetNewInstance(); - if ($oOrder->LoadFromField('ordernumber', $aParameter['ORDERID'])) { - $sPaymentState = $aParameter['STATUS']; - $this->HandleNotifyMessageForPaymentState($sPaymentState, $aParameter, $oOrder); - }" -TShopPaymentHandlerOgoneDirectLinkWithAliasGateway,* define message manager consumer name.,"public function PostSelectPaymentHook($sMessageConsumer) - { - $bContinue = parent::PostSelectPaymentHook($sMessageConsumer); - if ($bContinue) { - if (isset($this->aPaymentUserData['STATUS'])) { - if ('0' == $this->aPaymentUserData['STATUS']) { - //we just created an alias, so create a transaction - $bContinue = $this->ExecuteExternalPaymentCall(); - }" -TShopPaymentHandlerOgoneDirectLinkWithAliasGateway,"* parsed xml response data. - * - * @var array","public function PostProcessExternalPaymentHandlerHook() - { - $bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); - if ($bPaymentTransmitOk) { - $oGlobal = TGlobal::instance(); - $aUserData = $oGlobal->GetUserData(); - $bPaymentTransmitOk = $this->GetTransactionStatus($aUserData['PAYID']); - }" -TShopPaymentHandlerOgoneDirectLinkWithAliasGateway,"* return the path to the views for the payment handler relative to library/classes. - * - * @return string","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = parent::ExecutePayment($oOrder); - - if ($bPaymentOk && $this->TransactionMatchesCurrentBasketState()) { - $bPaymentOk = $this->UpdateTransaction('SAS'); //capture - }" -TShopPaymentHandlerOgoneDirectLinkWithAliasGateway,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function PostExecutePaymentHook(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $aDirectLinkPaymentUserDataFields = self::GetDirectLinkResponsePaymentUserDataFields(); - - foreach ($this->aXMLResponseData as $sKey => $sValue) { - if (in_array(self::GetDirectLinkResponsePaymentUserDataFieldPrefix().$sKey, $aDirectLinkPaymentUserDataFields)) { - $this->aPaymentUserData[self::GetDirectLinkResponsePaymentUserDataFieldPrefix().$sKey] = $sValue; - }" -TShopPaymentHandlerPayOne,* @psalm-suppress UndefinedClass - financegate* classes do not exist,"public function ValidateUserInput() - { - $bIsValid = parent::ValidateUserInput(); - - if ($bIsValid) { - $oMsgManager = TCMSMessageManager::GetInstance(); - - $sField = 'pseudocardpan'; - if (!array_key_exists($sField, $this->aPaymentUserData) || empty($this->aPaymentUserData[$sField])) { - $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-'.$sField, 'ERROR-USER-REQUIRED-FIELD-MISSING'); - $bIsValid = false; - }" -TShopPaymentHandlerPayOne,* MessageManager listener name.,"public function SaveUserPaymentDataToOrder($iOrderId) - { - $aUserPaymentData = $this->GetUserPaymentData(); - if (isset($_SESSION['PayOneResponse']) && is_array($_SESSION['PayOneResponse'])) { - $aUserPaymentData = array_merge($aUserPaymentData, $_SESSION['PayOneResponse']); - }" -TShopPaymentHandlerPayOne,* System constant to identify 3DSREDIRECT.,"public function GetHtmlHeadIncludes() - { - $aIncludes[] = ''; - $sTmpJs = $this->GetJsMethods(); - foreach ($sTmpJs as $sK => $sV) { - $aIncludes[] = $sV; - }" -TShopPaymentHandlerPayOne,"* if true the credit card expiration date will be submitted to the shop - * note: maybe this isn`t allowed by the credit card company (PCI). - * - * @var bool","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = parent::ExecutePayment($oOrder, $sMessageConsumer); - - $aParams = array(); - // payment preauthorization values - if (isset($_SESSION['3ds_payment'])) { - $aParams = $_SESSION['3ds_payment']; - unset($_SESSION['3ds_payment']); - }" -TShopPaymentHandlerPayOne,"* if true, the credit card validation is extended by a manual secure code check - * (redirect to credit card company gateway). - * - * @var bool - default = true","public function PostSelectPaymentHook($sMessageConsumer) - { - $bSuccess = parent::PostSelectPaymentHook($sMessageConsumer); - if ($bSuccess) { - $sDebugMsg = ''; - $bSuccess = false; - if ($this->bUse3DSecure) { - $aPayOneResponse = $this->PayOne3dSecure_3dScheck(); - if ($aPayOneResponse['success']) { - // Payment is finished - we don't need to redirect to Secure-PIN-URL! - // Redirecting to next step... - $bSuccess = true; - }" -TShopPaymentHandlerPayOne,"* Get path to view location. - * - * @return string","public function PostProcessExternalPaymentHandlerHook() - { - $bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); - if ($bPaymentTransmitOk) { - $oURLData = TCMSSmartURLData::GetActive(); - // If 3D-Secure Authentification fails, the ECI value is empty - if (!empty($oURLData->aParameters['eci']) && !empty($oURLData->aParameters['xid'])) { - $_SESSION['3ds_payment']['eci'] = $oURLData->aParameters['eci']; - $_SESSION['3ds_payment']['xid'] = $oURLData->aParameters['xid']; - $_SESSION['3ds_payment']['cavv'] = $oURLData->aParameters['cavv']; - $bPaymentTransmitOk = true; - }" -TShopPaymentHandlerPayOne,"* return the default payment data for the handler. - * - * @return array","public function GetExternalPaymentReferenceIdentifier() - { - $sIdent = ''; - if (is_array($this->aPaymentUserData) && array_key_exists('paymentDataId', $this->aPaymentUserData)) { - $sIdent = $this->aPaymentUserData['paymentDataId']; - }" -TShopPaymentHandlerPayPal,"* Version: this is the API version in the request. - * It is a mandatory parameter for each API request.","public function PostSelectPaymentHook($sMessageConsumer) - { - $bContinue = parent::PostSelectPaymentHook($sMessageConsumer); - if ($bContinue) { - $bContinue = $this->CallPayPalExpressCheckout($sMessageConsumer); - }" -TShopPaymentHandlerPayPal,* @var string|null,"public function PostProcessExternalPaymentHandlerHook() - { - $bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook(); - if ($bPaymentTransmitOk) { - $oGlobal = TGlobal::instance(); - $aUserData = $oGlobal->GetUserData(); - $sToken = $oGlobal->GetUserData('token'); - if (empty($sToken) && !is_null($this->sPayPalToken)) { - $sToken = $this->sPayPalToken; - }" -TShopPaymentHandlerPayPal,"* @var array|null","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = parent::ExecutePayment($oOrder); - - $oCurrency = null; - if (method_exists($oOrder, 'GetFieldPkgShopCurrency')) { - $oCurrency = $oOrder->GetFieldPkgShopCurrency(); - }" -TShopPaymentHandlerPayPal,* {@inheritdoc},"public function ExecutePayPalCall($methodName, $nvp) - { - $this->getPaypalLogger()->info(sprintf('PayPal-Request: %s with %s', $methodName, print_r($nvp, true))); - - $apiEndpoint = $this->GetConfigParameter('urlApiEndpoint'); - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $apiEndpoint); - curl_setopt($ch, CURLOPT_VERBOSE, 1); - - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); - - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POST, 1); - - //NVPRequest for submitting to server - $parameters = array( - 'METHOD' => $methodName, - 'VERSION' => self::PAYPAL_API_VERSION, - 'PWD' => $this->GetConfigParameter('apiPassword'), - 'USER' => $this->GetConfigParameter('apiUserName'), - 'SIGNATURE' => $this->GetConfigParameter('apiSignatur'), - ); - foreach ($nvp as $sKey => $sVal) { - if (!array_key_exists($sKey, $parameters)) { - $parameters[$sKey] = $sVal; - }" -TShopPaymentHandlerPayPal,* {@inheritdoc},"public function GetExternalPaymentReferenceIdentifier() - { - $sIdent = ''; - if (is_array($this->aPaymentUserData)) { - if (array_key_exists('TRANSACTIONID', $this->aPaymentUserData)) { - $sIdent = $this->aPaymentUserData['TRANSACTIONID']; - }" -TShopPaymentHandlerPayPalExpress,"* the method is called when an external payment handler returns successfully. - * - * for paypal express we need to set the user based on the paypal data (or, if a user is set, update - * it using the data passed) - * - * public function PostProcessExternalPaymentHandlerHook() { - * hier: - * Daten von PP übernehmen. - * $oUser = ExtUser::GetInstance(); - * Wenn CH-User angemeldet ($oUser->is_logged_in): - * Userdaten von PP Save() wenn Lieferadresse != isSameAs(); - * Wenn nicht: - * User anlegen mit PP Lieferadresse LoadFromRow() + Save()","public function PostProcessExternalPaymentHandlerHook() { - * hier: - * Daten von PP übernehmen. - * $oUser = ExtUser::GetInstance(); - * Wenn CH-User angemeldet ($oUser->is_logged_in): - * Userdaten von PP Save() wenn Lieferadresse != isSameAs(); - * Wenn nicht: - * User anlegen mit PP Lieferadresse LoadFromRow() + Save() - */ - public function PostProcessExternalPaymentHandlerHook() - { - $bResponse = parent::PostProcessExternalPaymentHandlerHook(); - - if ($bResponse) { - $oUser = TdbDataExtranetUser::GetInstance(); - if (is_null($oUser->id)) { - $aBilling = array(); - $aShipping = array(); - $this->GetUserDataFromPayPalData($aBilling, $aShipping); - if (empty($aShipping['firstname']) && empty($aShipping['lastname'])) { - $aShipping['firstname'] = $aBilling['firstname']; - $aShipping['lastname'] = $aBilling['lastname']; - }" -TShopPaymentHandlerPayPal_PayViaLink,"* a simple paypal integration that does not execute the payment on order, but instead provides a payment - * link/form that can be used by the user to pay for the order - * if you want to accept partial payments, you need to set bAcceptPartialPayments to 1. -/*","public function GetPayPalPaymentLink($oOrder, $dAmount = null, $sCurrency = null) - { - if (is_null($dAmount)) { - $dAmount = $oOrder->fieldValueTotal; - }" -TShopPaymentHandlerPayPal_PayViaLink,* @deprecated since 6.3.0 - not used anymore,"public function ProcessIPNRequest($oOrder, $aURLParameter) - { - $logger = $this->getPaypalLogger(); - - $sPayPalURL = $this->GetConfigParameter('url'); - $sPayPalURL = str_replace(array('https://', 'http://'), '', $sPayPalURL); - $sDomain = substr($sPayPalURL, 0, strpos($sPayPalURL, '/')); - $sPath = substr($sPayPalURL, strpos($sPayPalURL, '/')); - // send validate message back to paypal - $aVerifyData = TGlobal::instance()->GetUserData(null, array(), TCMSUserInput::FILTER_NONE); - - $sData = 'cmd=_notify-validate&'.str_replace('&', '&', TTools::GetArrayAsURL($aVerifyData)); - $sResponse = $this->sendRequest($sDomain, $sPath, $sData); - if (0 != strcmp($sResponse, 'VERIFIED')) { - $logger->error( - 'PayPal IPN: unable to send notify-validate response.', - [ - 'order_id' => $oOrder->id, - 'order_number' => $oOrder->fieldOrdernumber, - 'domain' => $sDomain, - 'path' => $sPath, - 'url_parameters' => $aURLParameter, - 'data' => $sData, - 'response' => $sResponse, - ] - ); - - return false; - }" -TShopPaymentHandlerPayPal_PayViaLink,"* @param TdbShopOrder $oOrder - * @param null $dAmount - * @param string $sCurrency - you can pass the currency used as an optional parameter to the method. if the currency - * package is installed and you do not pass the parameter, the method will use the currency - * of the order. if the package ist not installed, we default to EUR - * - * @return string","public function ExtractPayPalNVPResponse($nvpstr) - { - $intial = 0; - $nvpArray = array(); - - while (strlen($nvpstr)) { - //postion of Key - $keypos = strpos($nvpstr, '='); - //position of value - $valuepos = strpos($nvpstr, '&') ? strpos($nvpstr, '&') : strlen($nvpstr); - - /*getting the Key and Value values and storing in a Associative Array*/ - $keyval = substr($nvpstr, $intial, $keypos); - $valval = substr($nvpstr, $keypos + 1, $valuepos - $keypos - 1); - //decoding the respose - $nvpArray[urldecode($keyval)] = urldecode($valval); - $nvpstr = substr($nvpstr, $valuepos + 1, strlen($nvpstr)); - }" -TShopPaymentHandlerPayPal_PayViaLink,"* return the instant payment notification (IPN) URL for paypal. - * - * @param TdbShopOrder $oOrder - * - * @return string","public function GetConfigParameter($sParameterName) - { - static $bUseSandbox = null; - if (is_null($bUseSandbox)) { - $bUseSandbox = (IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX === $this->getEnvironment()); - }" -TShopPaymentHandlerSofortueberweisung,"* Handler build based on the 2.0 API (see documentation in ./TShopPaymentHandlerSofortueberweisung/Handbuch_Eigenintegration_sofortueberweisung.de_v.2.0.pdf - * Basic Flow - * 1. The user is shown the payment details in the payment step after selecting sofortüberweisung - * 2. when clicking on next, the user is moved to the ""review order screen"" - * 3. when clicking the ""confirm order"" button, the order creation process is started - * a) order is created - * b) user is redirected to the sofortüberweisungspage - * c) on success, the user is returned, the order is marked as paid, and the thankyou page is shown - * d) on failure, the order is marked as canceled, the user is returned to the overview page with the error message. - * - * note: sofortüberweisung sends the REAL order status via a notify url. the notify is the real status - so it will - * overwrite the status set for the order - * -/*","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - TTools::WriteLogEntry('In ExecutePayment Sofortueberweisung for order id '.$oOrder->id."" (nr: {$oOrder->fieldOrdernumber}" -TShopPaymentHandlerSofortueberweisung,"* pass control to sofortueberweisung.de - the method is called after the order is created, but before the order is - * marked as completed/paid - * we mark our session as payment interrupted. Control will be passed upon return to the OnPaymentSuccessHook - * AFTER we return from GUI. So OnPaymentSuccessHook will need to check the response. - * - * @param TdbShopOrder $oOrder - * @param string $sMessageConsumer - send error messages here - * - * @return bool","public function PostExecutePaymentHook(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = parent::PostExecutePaymentHook($oOrder, $sMessageConsumer); - - if ($bPaymentOk) { - $bPaymentOk = false; - // we never mark the order as paid... we wait for the notification to do that.... - // but we check if we allow the user to continue, or if we need to abort due to an error - $oGlobal = TGlobal::instance(); - if ('success' == $oGlobal->GetUserData('cmsPaymentMessage')) { - // validate data... - $bPaymentOk = $this->ValidateResponseData($oGlobal->GetUserData(), $oOrder, $sMessageConsumer); - - if ($bPaymentOk) { - // payment ok. note: we should not set the status of the order based on this result... instead we need to wait - // for the server-to-server notify. so - we need to perform any additional action (marking the order as paid is the job of the notify response - }" -TShopPaymentHandlerSofortueberweisung,"* return url to sofortueberweisung.de. - * - * @param TdbShopOrder $oOrder - * - * @return string","public function HandleNotifyMessage($aParameter) - { - TTools::WriteLogEntry('sofortüberweisung: handle notify message: '.print_r($aParameter, true), 4, __FILE__, __LINE__); - - // tradebyte extension... - $sOrderId = (array_key_exists('user_variable_3', $aParameter)) ? $aParameter['user_variable_3'] : ''; - $oOrder = TdbShopOrder::GetNewInstance(); - $oOrder->Load($sOrderId); - $this->SetOwningPaymentMethodId($oOrder->fieldShopPaymentMethodId); - - // if data is valid, mark order as paid - $bNotifyDataValid = $this->NotifyPayloadIsValid($aParameter); - if (true === $bNotifyDataValid) { - // load order - /** @var $oOrder TdbShopOrder */ - $sOrderId = (array_key_exists('user_variable_3', $aParameter)) ? $aParameter['user_variable_3'] : ''; - $oOrder = TdbShopOrder::GetNewInstance(); - $oOrder->Load($sOrderId); - if ($oOrder->fieldOrderIsPaid && false) { - TTools::WriteLogEntry(""sofortüberweisung-notify: order [{$oOrder->id}" -TShopPaymentHandlerEasyCash_Debit,"* @param TdbShopOrder $oOrder - * @param string $sMessageConsumer - send error messages here - * - * @return bool","public function ExecutePayment(TdbShopOrder $oOrder, $sMessageConsumer = '') - { - $bPaymentOk = parent::ExecutePayment($oOrder, $sMessageConsumer); - if ($bPaymentOk) { - $aEasyCashPayload = $this->GetPaymentPayload($oOrder); - - $aResponse = $this->SendRequestToEasyCash(self::EASY_CASH_DEBIT_PATH, $aEasyCashPayload); - $bPaymentOk = $this->ProcessOrderResponse($oOrder, $aResponse, $aEasyCashPayload, $sMessageConsumer); - }" -TShopPaymentHandlerEasyCash_Debit,"* return true if the user data is valid - * data is loaded from GetUserPaymentData(). - * - * @return bool","public function ValidateUserInput() - { - $bIsValid = parent::ValidateUserInput(); - $oMsgManager = TCMSMessageManager::GetInstance(); - $aRequiredFields = array('accountNr', 'accountOwner', 'bankNr', 'bankName'); - foreach ($aRequiredFields as $sRequiredField) { - $sValue = (array_key_exists($sRequiredField, $this->aPaymentUserData)) ? ($this->aPaymentUserData[$sRequiredField]) : (''); - $sValue = trim($sValue); - if (empty($sValue)) { - $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-'.$sRequiredField, 'ERROR-USER-REQUIRED-FIELD-MISSING'); - $bIsValid = false; - }" -TShopVariantDisplayHandler,"* return an instance of the handler type for the given id. - * - * @param string $sId - * - * @example TdbShopVariantDisplayHandler - * - * @return null|object","public function Render($oArticle, $sViewName = 'vStandard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - - $aSelectedTypeValues = TdbShopVariantDisplayHandler::GetActiveVariantTypeSelection(); - if (!is_array($aSelectedTypeValues)) { - $aSelectedTypeValues = array(); - }" -,* objects to which a vat applies must implement this interface.,"public function GetVat(); -}" -TCMSFieldShopVariantDetails,"* {@inheritdoc} - * - * manages the variant type and value details for an article - * - * @property TdbShopArticle $oTableRow","public function GetHTML() - { - $aData = array(); - $aData['sFieldName'] = $this->name; - $aData['sAjaxURL'] = $this->GenerateAjaxURL(); - $oParent = null; - /** @var TdbShopVariantSet $oVariantSet */ - $oVariantSet = $this->oTableRow->GetFieldShopVariantSet(); - - // is this a variant, and is the variantset defined in the parent? - if (!empty($this->oTableRow->fieldVariantParentId)) { - /** @var $oParent TdbShopArticle */ - $oParent = $this->oTableRow->GetFieldVariantParent(); - $oVariantSet = $oParent->GetFieldShopVariantSet(); - }" -TCMSFieldShopVariantDetails,* @var int,"public function GetEditLink($sTableName, $iTargetRecord) - { - static $aTableEditorConfs = array(); - if (!in_array($sTableName, $aTableEditorConfs)) { - $oTableConf = TdbCmsTblConf::GetNewInstance(); - $oTableConf->LoadFromField('name', $sTableName); - $aTableEditorConfs[$sTableName] = $oTableConf->id; - }" -TCMSFieldShopVariantDetails,* {@inheritdoc},"public function GetDatabaseCopySQL() - { - return ''; - }" -TCMSFieldShopVariantDetails,@var TdbShopVariantSet $oVariantSet,"public function GetSQL() - { - /** - * @var array $aNewValues - */ - $aNewValues = $this->getInputFilterUtil()->getFilteredInput($this->name.'_new'); - - if (!is_array($this->data)) { - $this->data = array(); - }" -TCMSFieldShopVariantDetails,@var $oParent TdbShopArticle,"public function generateVariants() - { - /** - * @var array|null $aVariantParameters - */ - $aVariantParameters = $this->getInputFilterUtil()->getFilteredInput('variantParameters'); - if (null === $aVariantParameters) { - return ''; - }" -TCMSFieldShopVariantDetails,"* @param TdbShopVariantSet|null $variantSet - * - * @return string","public function getPossibleVariantCombinations() - { - $aData = array(); - /** @var TdbShopVariantSet $variantSet */ - $aVariantTypeNames = array(); - $aExistingVariantCombinations = array(); - - $variantSet = $this->oTableRow->GetFieldShopVariantSet(); - $aVariantSurcharge = array(); - $aVariantParameter = array(); - - $possibleVariantsCount = 1; - if (null === $variantSet) { - return ''; - }" -TShopInterface_ImportOrderStatus,"* import the order status from a csv. the system will send a mail to users - * to inform them of their order changes. -/*","public function PerformImport() - { - $this->fp = fopen($this->sFileName, 'rb'); - - // get first line as the header line - $this->aHeaderFields = $this->GetLine(); - while ($aRow = $this->GetLine()) { - // prepare data - $aTmpData = array(); - reset($this->aHeaderFields); - foreach ($this->aHeaderFields as $iFieldIndex => $sFieldName) { - if (array_key_exists($iFieldIndex, $aRow)) { - $aTmpData[$sFieldName] = trim($aRow[$iFieldIndex]); - }" -TCMSListManagerShopArticles,"* {@inheritdoc} - * - * @return void","public function GetCustomRestriction() - { - $query = parent::GetCustomRestriction(); - - $filterArticleType = ''; - if (isset($this->tableObj->_postData['filterArticleType'])) { - if ('parents' == $this->tableObj->_postData['filterArticleType']) { - $filterArticleType = "" `shop_article`.`variant_parent_id` = '' ""; - }" -ShopRouteArticleFactory,* @var string,"public function __construct() - { - if (defined('PKG_SHOP_PRODUCT_URL_KEY_FIELD')) { - /** - * should inject the constant at some point - since this whould change the interface we can not do so in a patch version. - */ - $this->sqlTableFieldName = PKG_SHOP_PRODUCT_URL_KEY_FIELD; - }" -ShopRouteArticleFactory,* should inject the constant at some point - since this whould change the interface we can not do so in a patch version.,"public function createArticleFromIdentificationToken($identificationToken) - { - $article = TdbShopArticle::GetNewInstance(); - if (false === $article->LoadFromField($this->sqlTableFieldName, $identificationToken)) { - return null; - }" -TCMSSmartURLHandler_BuyProductDirectLink,"* looks for URLS of the form /kaufen/ean/number... these will result in the article being - * placed in the basket. - * - * @psalm-suppress UndefinedPropertyAssignment - * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","public function GetPageDef() - { - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - - $aParts = explode('/', $oURLData->sRelativeFullURL); - - $aParts = $this->CleanPath($aParts); - - if (3 == count($aParts) && TdbShopArticle::URL_EXTERNAL_TO_BASKET_REQUEST == $aParts[0] && 'id' == $aParts[1]) { - $oArticle = TdbShopArticle::GetNewInstance(); - /** @var $oArticle TdbShopArticle */ - if ($oArticle->Load($aParts[2])) { - // we need to perform a real redirect... - $oShopConfig = TdbShop::GetInstance($oURLData->iPortalId); - $iNode = $oShopConfig->GetSystemPageNodeId('checkout'); - $oNode = new TCMSTreeNode(); - /** @var $oNode TCMSTreeNode */ - $oNode->Load($iNode); - $iPageId = $oNode->GetLinkedPage(); - $this->getRequest()->query->set('pagedef', $iPageId); - $oURLData->sOriginalURL = $oArticle->GetDetailLink(false); - $oURLData->sRelativeFullURL = $oURLData->sOriginalURL; - - $sURL = $oArticle->GetToBasketLink(false, true); - $sURL = str_replace('&', '&', $sURL); - $this->getRedirect()->redirect($sURL); - }" -TCMSSmartURLHandler_ShopBasketSteps,"* assumes the path in the TCMSSmartURLData is a simple tree path. -/*","public function GetPageDef() - { - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - - $oShop = TdbShop::GetInstance($oURLData->iPortalId); - $oStep = $this->GetActiveStep($oURLData); - if (!is_null($oStep)) { - $this->aCustomURLParameters[MTShopOrderWizardCore::URL_PARAM_STEP_SYSTEM_NAME] = $oStep->fieldSystemname; - $iNode = $oShop->GetSystemPageNodeId('checkout'); - $oNode = new TCMSTreeNode(); - /** @var $oNode TCMSTreeNode */ - $oNode->Load($iNode); - $iPageId = $oNode->GetLinkedPage(); - }" -TCMSSmartURLHandler_ShopIPayment,"* assumes the path in the TCMSSmartURLData is a simple tree path. - * - * @psalm-suppress UndefinedPropertyAssignment - * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","public function GetPageDef() - { - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - - $iIPaymentPos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerIPayment::URL_PARAMETER_NAME); - if (false !== $iIPaymentPos) { - $sIPaymentCode = substr($oURLData->sRelativeURL, $iIPaymentPos + strlen(TShopPaymentHandlerIPayment::URL_PARAMETER_NAME)); - $oURLData->sRelativeURL = substr($oURLData->sRelativeURL, 0, $iIPaymentPos); - $aUrlParts = array(); - if (!empty($oURLData->sRelativeURLPortalIdentifier)) { - $aUrlParts[] = $oURLData->sRelativeURLPortalIdentifier; - }" -TCMSSmartURLHandler_ShopManufacturerProducts,* get the path to the product catalog.,"public function GetPageDef() - { - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - - $oShop = TdbShop::GetInstance($oURLData->iPortalId); - - $sProductPath = $oShop->GetLinkToSystemPage('manufacturer'); - if ('.html' == substr($sProductPath, -5)) { - $sProductPath = substr($sProductPath, 0, -5); - }" -TCMSSmartURLHandler_ShopPaymentOgone,"* If response from Ogone contains ""ogonenotifycmscall"", function triggers the HandleNotifyMessage from PaymentHandler - * On success exit an return http header 200 OK. On Failure exit and return http header 404 Not found. So Ogone send - * notify again. - * - * If response from Ogone contains ""ogone_cms_call"" the trigger der parent function to get pagedefid. - * - * @return bool|string - * - * @psalm-suppress UndefinedPropertyAssignment - * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","public function GetPageDef() - { - $oGlobal = TGlobal::instance(); - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - $iMessagePos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerOgone::URL_IDENTIFIER_NOTIFY); - $bNotifyIsValid = false; - if (false !== $iMessagePos) { - TTools::WriteLogEntry('OGONE: incoming notify message: '.print_r($oGlobal->GetUserData(), true), 1, __FILE__, __LINE__); - if ($oGlobal->UserDataExists('PAYHAID') && $oGlobal->UserDataExists('PAYCALL')) { - $sPaymentHandlerCMSIdent = $oGlobal->GetUserData('PAYHAID'); - $sInoParameter = $oGlobal->GetUserData('PAYCALL'); - if (TShopPaymentHandlerOgone::URL_IDENTIFIER == $sInoParameter && !empty($sPaymentHandlerCMSIdent)) { - $bNotifyIsValid = true; - }" -TCMSSmartURLHandler_ShopPaymentSofortueberweisungAPI,"* takes sofortueberweisung return urls and maps them to chameleon urls. - * - * @psalm-suppress UndefinedPropertyAssignment - * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","public function GetPageDef() - { - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - - $iMessagePos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerSofortueberweisung::URL_IDENTIFIER); - $sPaymentPayload = ''; - if (false !== $iMessagePos) { - TTools::WriteLogEntry('sofortueberweisung Payment Response: '.print_r($oURLData, true), 4, __FILE__, __LINE__); - $sPaymentMethod = substr($oURLData->sRelativeURL, $iMessagePos + strlen(TShopPaymentHandlerSofortueberweisung::URL_IDENTIFIER)); - $oURLData->sRelativeURL = substr($oURLData->sRelativeURL, 0, $iMessagePos); - $sNewRelativeURL = ''; - if ('' != $oURLData->sRelativeURLPortalIdentifier) { - $sNewRelativeURL .= '/'.$oURLData->sRelativeURLPortalIdentifier; - }" -TCMSSmartURLHandler_ShopPayPalAPI,"* takes paypal return urls and mapps them to chameleon urls. - * - * @psalm-suppress UndefinedPropertyAssignment - * @FIXME Writing data into `$OURLData` when there is no magic `__set` method for them defined.","public function GetPageDef() - { - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - - $iPayPalApiPos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerPayPal::URL_IDENTIFIER); - if (false !== $iPayPalApiPos) { - $sPayPalMethod = substr($oURLData->sRelativeURL, $iPayPalApiPos + strlen(TShopPaymentHandlerPayPal::URL_IDENTIFIER)); - $oURLData->sRelativeURL = substr($oURLData->sRelativeURL, 0, $iPayPalApiPos); - $oURLData->sRelativeFullURL = $oURLData->sRelativeURL; - if (!empty($oURLData->sLanguageIdentifier)) { - $oURLData->sRelativeFullURL = '/'.$oURLData->sLanguageIdentifier.$oURLData->sRelativeFullURL; - }" -TCMSSmartURLHandler_ShopPayPalIPN,@var TShopPaymentHandlerPayPal_PayViaLink $oPaymentHandler,"public function GetPageDef() - { - $logger = $this->getLogger(); - - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - if (false !== strpos($oURLData->sRelativeURL, TShopPaymentHandlerPayPal_PayViaLink::URL_IDENTIFIER_IPN)) { - $oGlobal = TGlobal::instance(); - $sOrderId = null; - $sPaymentHandlerId = null; - if (!$oGlobal->UserDataExists('custom')) { - $logger->error( - 'PayPal IPN: parameter ""custom"" missing from paypal IPN response: '.print_r( - $oGlobal->GetUserData(null, array(), TCMSUserInput::FILTER_NONE), - true - ) - ); - }" -TCMSSmartURLHandler_ShopProductExport,"* get the path to the product catalog. -/*","public function GetPageDef() - { - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - $oShop = TdbShop::GetInstance($oURLData->iPortalId); - - $sProductPath = $oShop->GetLinkToSystemPage('productexport'); - if ('.html' == substr($sProductPath, -5)) { - $sProductPath = substr($sProductPath, 0, -5); - }" -TCMSSmartURLHandler_ShopRemoteSearch,"* get the path to the product catalog. -/*","public function GetPageDef() - { - $iPageId = false; - $oURLData = TCMSSmartURLData::GetActive(); - - $oShop = TdbShop::GetInstance($oURLData->iPortalId); - - $sProductPath = $oShop->GetLinkToSystemPage('remotesearch'); - if ('.html' == substr($sProductPath, -5)) { - $sProductPath = substr($sProductPath, 0, -5); - }" -TPkgShopBasketStepsRouteCollectionGenerator,* @var SystemPageServiceInterface,"public function __construct(SystemPageServiceInterface $systemPageService, Connection $databaseConnection, RoutingUtilInterface $routingUtil) - { - $this->systemPageService = $systemPageService; - $this->databaseConnection = $databaseConnection; - $this->routingUtil = $routingUtil; - }" -TPkgShopBasketStepsRouteCollectionGenerator,* @var Connection,"public function getCollection($config, \TdbCmsPortal $portal, \TdbCmsLanguage $language) - { - $collection = new \Symfony\Component\Routing\RouteCollection(); - - $checkoutSystemPage = $this->systemPageService->getSystemPage('checkout', $portal, $language); - - if (null === $checkoutSystemPage) { - throw new TPkgCmsException_Log('Failed to create routing definition for basket steps because there is no system page ""checkout"" for the requested portal.', array('portal' => $portal->id)); - }" -TPkgShopBasketStepsRouteController,* @var ChameleonControllerInterface,"public function setMainController(ChameleonControllerInterface $mainController) - { - $this->mainController = $mainController; - }" -TPkgShopBasketStepsRouteController,* @return void,"public function basketStep(Request $request, $basketStepId, $basketStepSystemName, $defaultCheckoutPageId, $stepCheckoutPageId) - { - if ('/' === substr($basketStepSystemName, -1)) { - $basketStepSystemName = substr($basketStepSystemName, 0, -1); - }" -TPkgShopCategoryRouteCollectionGenerator,"* Class TPkgShopCategoryRouteCollectionGenerator - * create the routing info for categories. we can not use a yml here, since the page identifier is language specific.","public function __construct(SystemPageServiceInterface $systemPageService) - { - $this->systemPageService = $systemPageService; - }" -TPkgShopCategoryRouteCollectionGenerator,* @var SystemPageServiceInterface,"public function getCollection($config, TdbCmsPortal $portal, TdbCmsLanguage $language) - { - $systemPage = $this->systemPageService->getSystemPage('products', $portal, $language); - if (null === $systemPage) { - throw new TPkgCmsException_Log('No category system page defined (portal system page with name ""products"")', array('portal' => $portal->id)); - }" -TPkgShopRouteControllerArticle,* @var ChameleonControllerInterface,"public function shopArticleQuickShop(Request $request, $identifier, $pagedef) - { - $cmsident = $identifier; - $queryParameter = $request->query->all(); - if (0 === count($queryParameter)) { - $queryParameter = null; - }" -TPkgShopRouteControllerArticle,* @var ShopRouteArticleFactoryInterface,"public function shopArticle(Request $request, $identifier, $pagedef, $catid = null) - { - $queryParameter = $request->query->all(); - if (isset($queryParameter[TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY])) { - unset($queryParameter[TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY]); - }" -TPkgShopRouteControllerArticle,* @var CacheInterface,"public function shopCategory(Request $request, $category, $categoryPath, $pagedef) - { - $catPath = rtrim($category, '/'); - if ('.html' === substr($catPath, -5) && strlen($catPath) > 5) { - $catPath = substr($catPath, 0, -5); - }" -TPkgShopRouteControllerArticle,* @var ProductVariantServiceInterface,"public function setShopRouteArticleFactory(ShopRouteArticleFactoryInterface $shopRouteArticleFactory) - { - $this->shopRouteArticleFactory = $shopRouteArticleFactory; - }" -TPkgShopRouteControllerArticle,* @var InputFilterUtilInterface,"public function setMainController(ChameleonControllerInterface $mainController) - { - $this->mainController = $mainController; - }" -TPkgShopRouteControllerArticle,"* @param Request $request - * @param string $identifier - * @param string $pagedef - * - * @return Response","public function setCache($cache) - { - $this->cache = $cache; - }" -TPkgShopRouteControllerArticle,"* @param string $articleIdentificationToken - * - * @return TdbShopArticle|null","public function setProductVariantService(ProductVariantServiceInterface $productVariantService): void - { - $this->productVariantService = $productVariantService; - }" -TPkgShopRouteControllerArticle,"* @param Request $request - * @param string $identifier - * @param string $pagedef - * @param string|null $catid - * - * @return Response","public function setInputFilterUtil(InputFilterUtilInterface $inputFilterUtil): void - { - $this->inputFilterUtil = $inputFilterUtil; - }" -TCMSShopTableEditor_ShopArticle,"* overwritten to handle variant management. - * - * @property TdbShopArticle $oTable","public function ProcessFieldsBeforeDisplay($oFields) - { - /** @var TdbShopArticle $product */ - $product = $this->oTable; - if ($product->IsVariant()) { - $oParent = $product->GetFieldVariantParent(); - if (null != $oParent) { - $oVariantSet = $oParent->GetFieldShopVariantSet(); - if (!is_null($oVariantSet)) { - $aPermittedFields = $oVariantSet->GetMLTIdList('cms_field_conf', 'cms_field_conf_mlt'); - $oPermittedFields = new TIterator(); - $oFields->GoToStart(); - while ($oField = $oFields->Next()) { - /** @var $oField TCMSField */ - if (in_array($oField->oDefinition->id, $aPermittedFields)) { - $oPermittedFields->AddItem($oField); - }" -TCMSShopTableEditor_ShopArticle,"* if the current article is a variant AND a variant set has been defined, - * then mark all fields as hidden that are NOT activated through the set. - * - * @param TIterator $oFields - * - * @return void","public function Insert() - { - if ($this->isNewVariant()) { - $this->sId = $this->sRestriction; - $variant = $this->DatabaseCopy(); - /** @var TdbShopArticle $product */ - $product = $this->oTable; - if (!$product->fieldActive) { - $variantTableEditor = TTools::GetTableEditorManager('shop_article', $variant->id); - $variantTableEditor->SaveField('variant_parent_is_active', '0'); - }" -TCMSShopTableEditor_ShopArticle,@var TdbShopArticle $product,"public function CopyPropertyRecords($oField, $sourceRecordID) - { - if (!$this->isNewVariant() || 'shop_article_variants' != $oField->name) { - parent::CopyPropertyRecords($oField, $sourceRecordID); - }" -TCMSShopTableEditor_ShopArticle,@var $oField TCMSField,"public function UpdatePriceToLowestVariant() - { - /** @var TdbShopArticle $product */ - $product = $this->oTable; - $oLowestPriceVariant = $product->GetLowestPricedVariant(); - if ($oLowestPriceVariant) { - $aData = array('price' => $oLowestPriceVariant->fieldPriceFormated, 'price_reference' => $oLowestPriceVariant->fieldPriceReferenceFormated); - $this->SaveFields($aData, false); - }" -TCMSShopTableEditor_ShopDiscount,"* overwritten to handle variant management. - * - * @property TdbShopDiscount $oTable","public function Delete($sId = null) - { - $this->oTable->ClearCacheOnAllAffectedArticles(); - parent::Delete($sId); - }" -TCMSShopTableEditor_ShopOrderItem,"* if we are deleting a bundle article we need to delete the related items - * note: adding or changing an article will trigger no such change. -/*","public function Delete($sId = null) - { - /** - * @var TShopOrderItem $item - */ - $item = $this->oTable; - if ($item->fieldIsBundle) { - $oOrderItemTableConf = $item->GetTableConf(); - $oBundleArticles = $item->GetFieldShopOrderBundleArticleList(); - - while ($oBundleArticle = $oBundleArticles->Next()) { - // now delete connected order item - $oOrderItemEditor = new TCMSTableEditorManager(); - /** @var $oOrderItemEditor TCMSTableEditorManager */ - $oOrderItemEditor->Init($oOrderItemTableConf->id, $oBundleArticle->fieldBundleArticleId); - $oOrderItemEditor->Delete($oBundleArticle->fieldBundleArticleId); - }" -TCMSShopTableEditor_ShopVoucherSeries,"* set public methods here that may be called from outside. - * - * @return void","public function DefineInterface() - { - parent::DefineInterface(); - $this->methodCallAllowed[] = 'CreateVoucherCodes'; - $this->methodCallAllowed[] = 'ExportVoucherCodes'; - }" -TCMSShopTableEditor_ShopVoucherSeries,* add table-specific buttons to the editor (add them directly to $this->oMenuItems).,"public function CreateVoucherCodes($sCode = null, $iNumberOfVouchers = null) - { - $oReturn = new stdClass(); - $oReturn->bError = false; - $oReturn->sMessage = 'Gutscheine erstellt'; - - if ($this->AllowCreatingVoucherCodes()) { - $oGlobal = TGlobal::instance(); - if (is_null($iNumberOfVouchers)) { - $iNumberOfVouchers = intval($oGlobal->GetUserData('iNumberOfVouchers')); - }" -TCMSShopTableEditor_ShopVoucherSeries,"* create a number of vouchers in the shop_voucher table. - * - * @param string $sCode - the code to use. if empty, a random unique code will be generated - * @param int $iNumberOfVouchers - number of vouchers to create (will fetch this from user input if null given) - * - * @return stdClass","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - $aIncludes[] = ''; - - return $aIncludes; - }" -TCMSShopTableEditor_ShopVoucherSeries,@var $oVoucher TdbShopVoucher,"public function ExportVoucherCodes() - { - $sReturn = ''; - - if ($this->AllowExportingVoucherCodes()) { - $oVouchers = TdbShopVoucherList::GetList(""SELECT * FROM `shop_voucher` WHERE `shop_voucher_series_id`='"".MySqlLegacySupport::getInstance()->real_escape_string($this->sId).""'""); - $oVouchers->GoToStart(); - $count = 0; - while ($oVoucher = $oVouchers->Next()) { - $aCsvVouchers[$count][0] = str_replace('""', '""""', $oVoucher->fieldCode); - if ('0000-00-00 00:00:00' != $oVoucher->fieldDatecreated) { - $aCsvVouchers[$count][1] = date('d.m.Y H:i', strtotime($oVoucher->fieldDatecreated)); - }" -TCMSTableEditorShopArticleReview,"* gets called after save if all posted data was valid. - * - * @param TIterator $oFields holds an iterator of all field classes from DB table with the posted values or default if no post data is present - * @param TCMSRecord $oPostTable holds the record object of all posted data","public function Delete($sId = null) - { - if (null === $sId) { - parent::Delete($sId); - - return; - }" -TCMSTableEditorShopCategory,"* gets called after save if all posted data was valid. - * - * @param TIterator $oFields holds an iterator of all field classes from DB table with the posted values or default if no post data is present - * @param TCMSRecord $oPostTable holds the record object of all posted data","public function UpdatePageNaviBreadCrumb() - { - $sEditLanguage = $this->oTableConf->GetLanguage(); - $breadcrumbs = self::GetNavigationBreadCrumbs($this->sId, $sEditLanguage); - $this->SaveField('url_path', $breadcrumbs); - // now we also need to update all children of this category... - $oCategory = TdbShopCategory::GetNewInstance(); - $oCategory->SetLanguage($sEditLanguage); - /** @var $oCategory TdbShopCategory */ - if (!$oCategory->Load($this->sId)) { - $oCategory = null; - }" -TCMSTableEditorShopOrderEndPoint,"* @property TdbShopOrder $oTable - * @property TdbShopOrder $oTablePreChangeData","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - $aIncludes[] = ''; - - return $aIncludes; - }" -TCMSTableEditorShopOrderEndPoint,* {@inheritdoc},"public function ShopOrderSendConfirmOrderMail($sMail = null) - { - $oGlobal = TGlobal::instance(); - if (is_null($sMail)) { - $sMail = $oGlobal->GetUserData('sTargetMail'); - }" -TCMSTableEditorShopOrderEndPoint,"* send the current order to the email. - * - * @param string $sMail - can also be passed via get/post - * - * @return TCMSstdClass","public function GetFrontendActionUrlToSendOrderEmail($sMail = null) - { - $sURL = ''; - if (is_null($sMail)) { - $oGlobal = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.global'); - $sMail = $oGlobal->GetUserData('sTargetMail'); - }" -TCMSTableEditorShopOrderEndPoint,@var $oOrder TdbShopOrder,"public function exportOrder(): array - { - $translator = $this->getTranslator(); - - if (false !== $this->oTable->ExportOrderForWaWiHook($this->oTable->GetPaymentHandler())) { - $this->oTable->MarkOrderAsExportedToWaWi(true); - - return [ - 'messageType' => 'SUCCESS', - 'message' => $translator->trans('chameleon_system_shop.orders.export_success') - ]; - }" -TCMSTableEditorShopOrderEndPoint,"* send order notification for current order from backend - uses frontend action, - * so portal and snippets are set correctly. - * - * @param string $sMail - can also be passed via get/post - * - * @return string","public function DefineInterface() - { - parent::DefineInterface(); - $this->methodCallAllowed[] = 'ShopOrderSendConfirmOrderMail'; - $this->methodCallAllowed[] = 'GetFrontendActionUrlToSendOrderEmail'; - $this->methodCallAllowed[] = 'exportOrder'; - }" -TCMSTableEditorShopUser,"* special handling for the shop users - we want to sync the newsletter info with the user info. -/*","public function Delete($sId = null) - { - if (null !== $sId) { - $this->DeleteNewsletterInfo($sId); - }" -BasketItemEvent,* @var \TShopBasket,"public function __construct(\TdbDataExtranetUser $user, \TShopBasket $basket, \TShopBasketArticle $basketArticle = null) - { - $this->basket = $basket; - $this->basketArticle = $basketArticle; - $this->user = $user; - }" -BasketItemEvent,* @var \TShopBasketArticle,"public function getBasket() - { - return $this->basket; - }" -BasketItemEvent,* @var \TdbDataExtranetUser,"public function getBasketArticle() - { - return $this->basketArticle; - }" -BasketItemEvent,* @return \TShopBasket,"public function getUser() - { - return $this->user; - }" -,* @return \TShopBasket,"public function getBasket(); - - /** - * @return \TShopBasketArticle - */ - public function getBasketArticle(); - - /** - * @return \TdbDataExtranetUser - */ - public function getUser(); -}" -TShopBasketArticleCore,"* represents an article in the basket. -/*","public function GetLastUpdatedTimestamp() - { - return $this->iLastChangedTimestamp; - }" -TShopBasketArticleCore,"* @var float - * the amount of this item in the basket. it will also be saved to session","public function GetActingDiscountList() - { - return $this->oActingShopDiscountList; - }" -TShopBasketArticleCore,"* @var float - * holds the original total price (amount*price)","public function ResetDiscounts() - { - $this->oActingShopDiscountList = null; - $this->dPriceAfterDiscount = $this->dPrice; - $this->dPriceTotalAfterDiscount = $this->dPriceTotal; - $this->dPriceAfterDiscountWithoutVouchers = $this->dPriceAfterDiscount; - $this->dPriceTotalAfterDiscountWithoutVouchers = $this->dPriceTotalAfterDiscount; - }" -TShopBasketArticleCore,"* @var float - * holds the price after deducting any discount assigned to the item","public function ApplyDiscount(TdbShopDiscount $oShopDiscount, $dMaxValueUsable = 0) - { - $dRemainingValue = 0; - if (is_null($this->oActingShopDiscountList)) { - $this->oActingShopDiscountList = new TShopBasketArticleDiscountList(); - }" -TShopBasketArticleCore,"* @var float - * holds the total price after deducting any discount assigned to the item","public function getCustomData() - { - return $this->customData; - }" -TShopBasketArticleCore,"* holds the value of the article after all discounts have been applied WITHOUT discount vouchers. - * - * @var float","public function setCustomData(array $customData) - { - $this->customData = $customData; - $this->UpdateBasketItemKey(); - }" -TShopBasketArticleCore,* @var float,"public function GetToNoticeListLink($bRemoveFromBasket = true, $bIncludePortalLink = false) - { - if (!$bRemoveFromBasket) { - return parent::GetToNoticeListLink($bIncludePortalLink); - }" -TShopBasketArticleCore,"* total weight of the articles. - * - * @var float","public function GetRemoveFromBasketLink() - { - $activeShop = $this->getShopService()->getActiveShop(); - $aParameters = array('module_fnc['.$activeShop->GetBasketModuleSpotName().']' => 'RemoveFromBasketViaBasketItemKey', MTShopBasketCore::URL_ITEM_BASKET_KEY => $this->sBasketItemKey, MTShopBasketCore::URL_MESSAGE_CONSUMER => MTShopBasketCore::MSG_CONSUMER_NAME); - - return $this->getActivePageService()->getLinkToActivePageRelative($aParameters); - }" -TShopBasketArticleCore,"* total volume of the articles. - * - * @var float","public function IsSameAs($oItem) - { - $bIsSame = false; - if ($this->sBasketItemKey == $oItem->sBasketItemKey) { - $bIsSame = true; - }" -TShopBasketArticleCore,"* @var string - * identifies the basket item based on the parameters checked via IsSameAs method - * So two basket items with the same sBasketItemKey ARE the same basket product. - * the properties is automatically set via the UpdateBasketItemKey method which needs to be - * called anytime any of the relevant properties change","public function ChangeAmount($dNewAmount) - { - $dOldAmount = $this->dAmount; - $this->dAmount = $dNewAmount; - if ($this->TotalStockAvailable() < $this->dAmount) { - $this->dAmount = $this->TotalStockAvailable(); - }" -TShopBasketArticleCore,* @var TShopBasketArticleDiscountList,"public function SetActingDiscount(TdbShopDiscount $oActingShopDiscount) - { - $this->oActingShopDiscount = $oActingShopDiscount; - }" -TShopBasketArticleCore,* @var TdbShopShippingType,"public function SetActingShippingType(TdbShopShippingType $oShippingType) - { - $this->oActingShopBasketShippingType = $oShippingType; - }" -TShopBasketArticleCore,"* timestamp set to the last time the amount of the item changed - * access via getter GetLastUpdatedTimestamp. - * - * @var int|null","public function GetActingShippingType() - { - return $this->oActingShopBasketShippingType; - }" -TShopBasketArticleCore,* @var array,"public function ResetShippingMarker() - { - $this->oActingShopBasketShippingType = null; - }" -TShopBasketArticleCore,"* return timestamp when the item was last updated. - * - * @return int|null","public function RefreshDataFromDatabase() - { - $this->ClearInternalCache(); - $sActiveLanguageId = self::getLanguageService()->getActiveLanguageId(); - if (null !== $sActiveLanguageId) { - $this->SetLanguage($sActiveLanguageId); - }" -TShopBasketArticleCore,"* return acting discount list. - * - * @return TShopBasketArticleDiscountList","public function __sleep() - { - $aSleep = array('table', 'id', 'iLanguageId', 'dAmount', 'dPriceTotal', - 'dPriceAfterDiscount', 'dPriceTotalAfterDiscount', 'dPriceAfterDiscountWithoutVouchers', 'dPriceTotalAfterDiscountWithoutVouchers', - 'dTotalWeight', 'dTotalVolume', 'sBasketItemKey', - ""\0TShopBasketArticleCore\0iLastChangedTimestamp"", - ""\0TShopBasketArticleCore\0customData"", ); // the \0CLASSNAME\0PROPERTY is needed for private vars if the class is extended by some other class - return $aSleep; - }" -TShopBasketArticleCore,"* remove acting discounts. - * - * @return void","public function SetPriceBasedOnActiveDiscounts() - { - }" -TShopBasketArticleCoreList,"* The TIterator based article list overwrites the standard add item method in such a way that if - * the same article is added again, it simply increases the amout of that item. same goes for the - * remove function. - * - * @extends TIterator","public function ObserverRegister($sObserverName, $oObserver) - { - if (!array_key_exists($sObserverName, $this->aObservers)) { - $this->aObservers[$sObserverName] = $oObserver; - }" -TShopBasketArticleCoreList,"* the sume of all amount fields in the basket (ie total number of articles). - * - * @var float","public function ObserverUnregister($sObserverName) - { - if (array_key_exists($sObserverName, $this->aObservers)) { - unset($this->aObservers[$sObserverName]); - }" -TShopBasketArticleCoreList,"* the original product price of all articles in the list (before discounts, vouchers, etc). - * - * @var float","public function Refresh() - { - $iPt = $this->getItemPointer(); - $this->GoToStart(); - while ($oTmp = $this->Next()) { - if (false === $oTmp->sqlData || ($oTmp->dAmount <= 0)) { - $this->RemoveArticle($oTmp); - }" -TShopBasketArticleCoreList,"* total weight of all articles in the list. - * - * @var float","public function GetArticlesAffectedByShippingType(TdbShopShippingType $oShippingType) - { - $oArticles = new TShopBasketArticleList(); - /** @var $oArticles TShopBasketArticleList */ - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - if ($oShippingType->ArticleAffected($oItem)) { - $oArticles->AddItem($oItem); - }" -TShopBasketArticleCoreList,"* total volume of all articles in the list. - * - * @var float","public function GetListMatchingVat(TdbShopVat $oVat) - { - $oArticles = new TShopBasketArticleList(); - /** @var $oArticles TShopBasketArticleList */ - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - $oItemVat = $oItem->GetVat(); - if (!is_null($oItemVat) && $oItemVat->id == $oVat->id) { - $oArticles->AddItem($oItem); - }" -TShopBasketArticleCoreList,"* list of observing objects. - * - * @var array","public function AddItem($oItem) - { - $bWasAdded = true; - $iCurrentPos = $this->getItemPointer(); - $this->GoToStart(); - $bFound = false; - while (!$bFound && ($oExistingItem = $this->Next())) { - /** @var $oExistingItem TShopBasketArticle */ - if ($oExistingItem->IsSameAs($oItem)) { - $bFound = true; - }" -TShopBasketArticleCoreList,"* register an observer with the user. - * - * @param string $sObserverName - * @param IDataExtranetUserObserver $oObserver - * - * @return void","public function IsInList($oItem) - { - $bIsInList = false; - $iCurPos = $this->getItemPointer(); - $this->GoToStart(); - while (!$bIsInList && ($oTmpItem = $this->Next())) { - if ($oTmpItem->id == $oItem->id) { - $bIsInList = true; - }" -TShopBasketArticleCoreList,"* remove an observer from the list. - * - * @param string $sObserverName - * - * @return void","public function UpdateItemAmount(TShopBasketArticle $oItem) - { - $bWasUpdated = false; - if ($oItem->dAmount <= 0) { - $this->RemoveArticle($oItem); - }" -TShopBasketArticleCoreList,"* check list for dead articles. - * - * @return void","public function next(): TShopBasketArticle|bool - { - return parent::Next(); - }" -TShopBasketArticleCoreList,"* returns array with pointers to all basket articles that match the shipping type. - * - * @param TdbShopShippingType $oShippingType - * - * @return TShopBasketArticleList","public function RemoveArticle(TShopBasketArticle $oItem) - { - // find the item, then drop it - $oItemToRemove = $this->FindItemWithProperty('sBasketItemKey', $oItem->sBasketItemKey); - - if (false === $oItemToRemove) { - return null; - }" -TShopBasketArticleCoreList,@var $oArticles TShopBasketArticleList,"public function GetBasketSumForVoucher(TdbShopVoucher $oVoucher) - { - // get the sum of all products (if the voucher is not sponsored, we exclude products with ""ExcludeFromVouchers"") - $iCurrentPosition = $this->getItemPointer(); - $this->GoToStart(); - $oVoucherDef = $oVoucher->GetFieldShopVoucherSeries(); - $dProductValue = 0; - while ($oItem = $this->Next()) { - $bIncludeProduct = $oVoucher->AllowVoucherForArticle($oItem); - if ($bIncludeProduct) { - $dProductValue = $dProductValue + $oItem->dPriceTotalAfterDiscountWithoutVouchers; - }" -TShopBasketArticleCoreList,@var $oArticles TShopBasketArticleList,"public function ReducePriceForItemsAffectedByNoneSponsoredVoucher(TdbShopVoucher $oVoucher, $dVoucherValue) - { - $currentPosition = $this->getItemPointer(); - $this->GoToStart(); - $articlesAffected = array(); - $totalValueOfAffectedItems = 0; - while ($basketItem = $this->Next()) { - if (true === $oVoucher->AllowVoucherForArticle($basketItem)) { - $articlesAffected[] = $basketItem; - $totalValueOfAffectedItems = $totalValueOfAffectedItems + $basketItem->dPriceTotalAfterDiscountWithoutVouchers; - }" -TShopBasketArticleCoreList,@var $oArticles TShopBasketArticleList,"public function reducePriceForItemsAffectedByDiscount(\TdbShopDiscount $discount, float $unusedDiscountValue): void - { - $currentPosition = $this->getItemPointer(); - $this->GoToStart(); - $articlesAffected = array(); - $totalValueOfAffectedItems = 0; - while ($basketItem = $this->Next()) { - if (true === $discount->AllowDiscountForArticle($basketItem)) { - $articlesAffected[] = $basketItem; - $totalValueOfAffectedItems = $totalValueOfAffectedItems + $basketItem->dPriceTotalAfterDiscountWithoutVouchers; - }" -TShopBasketArticleCoreList,"* return list matchin the vat group. - * - * @param TdbShopVat $oVat - * - * @return TShopBasketArticleList","public function GetBasketQuantityForVoucher(TdbShopVoucher $oVoucher) - { - $iCurrentPosition = $this->getItemPointer(); - $this->GoToStart(); - $iAmount = 0; - while ($oItem = $this->Next()) { - $bIncludeProduct = $oVoucher->AllowVoucherForArticle($oItem); - if ($bIncludeProduct) { - $iAmount = $iAmount + $oItem->dAmount; - }" -TShopBasketArticleCoreList,@var $oArticles TShopBasketArticleList,"public function GetBasketSumForDiscount(TdbShopDiscount $oDiscount) - { - // get the sum of all products (we exclude products with ""fieldExcludeFromDiscounts"") - $iCurrentPosition = $this->getItemPointer(); - $this->GoToStart(); - $dProductValue = 0; - while ($oItem = $this->Next()) { - $bIncludeProduct = $oDiscount->AllowDiscountForArticle($oItem); - if ($bIncludeProduct) { - $dProductValue = $dProductValue + $oItem->dPriceTotal; - }" -TShopBasketArticleCoreList,"* marks the item in the list with the shipping type. - * - * @param TShopBasketArticle $oItem - * @param TdbShopShippingType $oShippingType - * - * @return void","public function GetBasketQuantityForDiscount(TdbShopDiscount $oDiscount) - { - // get the sum of all products (we exclude products with ""fieldExcludeFromDiscounts"") - $iCurrentPosition = $this->getItemPointer(); - $this->GoToStart(); - $iAmount = 0; - while ($oItem = $this->Next()) { - $bIncludeProduct = $oDiscount->AllowDiscountForArticle($oItem); - if ($bIncludeProduct) { - $iAmount = $iAmount + $oItem->dAmount; - }" -TShopBasketArticleCoreList,@var $oExistingItem TShopBasketArticle,"public function Render($sViewName = 'mini', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - - $oShop = TdbShop::GetInstance(); - $oView->AddVar('oShop', $oShop); - $oView->AddVar('oArticleList', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopBasketArticleCoreList,"* add a TShopBasketArticle to the article list. if such an item is already in the basket, we just add the amount - * instead of inserting a new entry. - * returns true if the item was added, false if it was removed (happens if the amount falls below zero). - * - * @param TShopBasketArticle $oItem - * - * @return bool","public function ApplyDiscount(TdbShopDiscount $oDiscount) - { - $iCurrentPosition = $this->getItemPointer(); - $this->GoToStart(); - - $dTotalDiscountValue = 0; - $bIsAbsoluteDiscount = ('absolut' == $oDiscount->fieldValueType); - if ($bIsAbsoluteDiscount) { - $dTotalDiscountValue = $oDiscount->fieldValue; - }" -TShopBasketArticleCoreList,@var $oExistingItem TShopBasketArticle,"public function GetTotalDiscountValue() - { - $iCurrentPosition = $this->getItemPointer(); - $this->GoToStart(); - - $dTotalDiscountValue = 0; - - while ($oItem = $this->Next()) { - $dTotalDiscountValue += ($oItem->dPriceTotal - $oItem->dPriceTotalAfterDiscount); - }" -TShopBasketArticleCoreList,"* return true if the item is in the list (uses the IsSameAs method). - * - * @param TShopBasketArticle $oItem - * - * @return bool","public function ResetAllDiscounts() - { - $iCurrentPosition = $this->getItemPointer(); - $this->GoToStart(); - - while ($oItem = $this->Next()) { - $oItem->ResetDiscounts(); - }" -TShopBasketArticleCoreList,"* changes the amount of the requested item. if the amount drops to zero, the item is removed - * if the item does not exists, it is added - * returns true if the item was added, false if it was removed (amount fell below zero). - * - * @param TShopBasketArticle $oItem - * - * @return bool","public function ResetAllShippingMarkers() - { - $iCurrentPosition = $this->getItemPointer(); - $this->GoToStart(); - - while ($oItem = $this->Next()) { - $oItem->ResetShippingMarker(); - }" -TShopBasketArticleCoreList,@var $oExistingItem TShopBasketArticle,"public function ValidateBasketContents($sMessageManager) - { - $bIsValid = true; - $oMessage = TCMSMessageManager::GetInstance(); - $iPt = $this->getItemPointer(); - $this->GoToStart(); - while ($oTmp = $this->Next()) { - if ($oTmp->TotalStockAvailable() < $oTmp->dAmount) { - $aErrorCodes = $oTmp->GetSQLWithTablePrefix(); - $aErrorCodes['dStockWanted'] = $oTmp->dAmount; - if ($oTmp->TotalStockAvailable() > 0) { - $aErrorCodes['dStockAvailable'] = $oTmp->TotalStockAvailable(); - $oMessage->AddMessage($sMessageManager, 'ERROR-ADD-TO-BASKET-NOT-ENOUGH-STOCK', $aErrorCodes); - $this->validateBasketContentBuyable($oTmp, $sMessageManager); - }" -TShopBasketArticleCoreList,"* overwrote the method so that the id could type hint properly. - * - * @return TShopBasketArticle|bool","public function updateCustomData(string $basketIdentifier, array $customData): bool - { - $item = $this->FindItemWithProperty('sBasketItemKey', $basketIdentifier); - if (false === $item) { - return false; - }" -TShopBasketArticleCustomDataValidationError,* @var string,"public function __construct($itemName, $errorMessageCode, array $additionalData = array()) - { - $this->itemName = $itemName; - $this->errorMessageCode = $errorMessageCode; - $this->additionalData = $additionalData; - }" -TShopBasketArticleCustomDataValidationError,* @var string,"public function setAdditionalData($additionalData) - { - $this->additionalData = $additionalData; - }" -TShopBasketArticleCustomDataValidationError,* @var array,"public function getAdditionalData() - { - return $this->additionalData; - }" -TShopBasketArticleCustomDataValidationError,"* @param string $itemName - * @param string $errorMessageCode - * @param array $additionalData","public function setErrorMessageCode($errorMessageCode) - { - $this->errorMessageCode = $errorMessageCode; - }" -TShopBasketArticleCustomDataValidationError,"* @param array $additionalData - * - * @return void","public function getErrorMessageCode() - { - return $this->errorMessageCode; - }" -TShopBasketArticleCustomDataValidationError,* @return array,"public function setItemName($itemName) - { - $this->itemName = $itemName; - }" -TShopBasketArticleCustomDataValidationError,"* @param string $errorMessageCode - * - * @return void","public function getItemName() - { - return $this->itemName; - }" -holds,"* class holds a list of discounts acting on a basket article. -/*","public function next(): TdbShopDiscount|bool - { - return parent::Next(); - }" -holds,"* return next itme. - * - * @return TdbShopDiscount|bool","public function Previous() - { - return parent::Previous(); - }" -holds,"* return previous itme. - * - * @return TdbShopDiscount|false","public function current():TdbShopDiscount|bool - { - return parent::Current(); - }" -TShopBasketCore,"* Der Warenkorb enthält die vom Kunden zur Bestellung vorgemerkten Artikel. - * Diese Komponente ist für die Berechnung der Versandkosten, Rabatte, Steuern, - * sowie möglicher, durch Bezahlarten verursachter, Zusatzkosten zuständig. - * Außerdem wird über den Warenkorb die tatsächliche Bestellung, inklusive etwaiger - * Exporte durchgeführt. - * Der Warenkorb kann optional anzeigen, ab welcher Summe die nächstgünstigere - * Versandkostenschwelle erreicht würde. Diese Information kann im Miniwarenkorb - * sowie im Hauptwarenkorb angezeigt werden. -/*","public function isTotalCostKnown() - { - return $this->totalCostKnown; - }" -TShopBasketCore,"* The calculated gross sum of all articles in the basket. - * This is the price calculated before discounts or vouchers have been applied - * @var float","public function __construct() - { - }" -TShopBasketCore,"* the total delivery costs (gross) - * @var float","public function SetBasketRecalculationFlag($bRecalculationNeeded = true) - { - $this->bMarkAsRecalculationNeeded = $bRecalculationNeeded; - }" -TShopBasketCore,"* the total wrapping costs for the basket (gross) - * @var float","public function BasketRequiresRecalculation() - { - return $this->bMarkAsRecalculationNeeded; - }" -TShopBasketCore,"* the total gross wrapping card costs - * @var float","public function __get($sVar) - { - if ('bMarkAsRecalculationNeeded' == $sVar) { - trigger_error('DO NOT access bMarkAsRecalculationNeeded as property. use SetBasketRecalculationFlag() and BasketRequiresRecalculation() instead!', E_USER_WARNING); - - return $this->BasketRequiresRecalculation(); - }" -TShopBasketCore,"* total gross voucher value for the basket - * NOTE: includes ONLY sponsored vouchers - * @var float","public function __set($sVar, $sVal) - { - if ('bMarkAsRecalculationNeeded' == $sVar) { - trigger_error('DO NOT access bMarkAsRecalculationNeeded as property. use SetBasketRecalculationFlag() and BasketRequiresRecalculation() instead!', E_USER_WARNING); - - return $this->SetBasketRecalculationFlag($sVal); - }" -TShopBasketCore,"* the total for all NONE sponsored vouchers (vouchers that act as discounts - so DO affect VAT). - * @var float","public function __clone() - { - foreach ($this as $sPropName => $sPropVal) { - if (is_object($this->$sPropName)) { - $this->$sPropName = clone $this->$sPropName; - }" -TShopBasketCore,"* the total gross discount sum - * @var float","public function SetActiveShippingGroup($oShippingGroup) - { - $bGroupAssigned = false; - if (!is_null($oShippingGroup)) { - $oAvailableShippingGroups = $this->GetAvailableShippingGroups(); - if (!is_null($oAvailableShippingGroups) && $oAvailableShippingGroups->IsInList($oShippingGroup->id)) { - $bGroupAssigned = true; - $this->oActiveShippingGroup = $oShippingGroup; - - // if a payment method is selected, then we need to make sure it is available for the selected shipping group. - // since the SetActivePaymentmethod performs the check we call it. - if (!is_null($this->GetActivePaymentMethod())) { - $this->SetActivePaymentMethod($this->GetActivePaymentMethod()); - }" -TShopBasketCore,"* the total article costs after discounts have been applied - * NOTE: vouchers not sponsored are included in this price - so this represents the REAL article price. - * - * @var float","public function GetActiveShippingGroup() - { - if (is_null($this->oActiveShippingGroup)) { - // fetch the one from the shop - $oShopConfig = TdbShop::GetInstance(); - $oActiveShippingGroup = $oShopConfig->GetFieldShopShippingGroup(); - if (false == $this->SetActiveShippingGroup($oActiveShippingGroup)) { - // unable to set - group not in allowed list - $oList = $this->GetAvailableShippingGroups(); - $oList->GoToStart(); - if ($oList->Length() > 0) { - $oActiveShippingGroup = $oList->Current(); - $this->SetActiveShippingGroup($oActiveShippingGroup); - }" -TShopBasketCore,* @var float,"public function GetActiveShippingGroupWithoutLoading() - { - return $this->oActiveShippingGroup; - }" -TShopBasketCore,"* the sum of all VAT costs - * @var float","public function GetAvailableShippingGroups() - { - return TdbShopShippingGroupList::GetAvailableShippingGroups(); - }" -TShopBasketCore,"* the sum of all VAT costs excluding shipping costs - * @var float","public function GetAvailablePaymentMethods() - { - $oList = null; - if ($this->GetActiveShippingGroup()) { - $oList = $this->GetActiveShippingGroup()->GetValidPaymentMethods(); - }" -TShopBasketCore,"* the grand total for the basket - * @var float","public function GetValidPaymentMethodsSelectableByTheUser() - { - $oList = null; - if ($this->GetActiveShippingGroup()) { - $oList = $this->GetActiveShippingGroup()->GetValidPaymentMethodsSelectableByTheUser(); - }" -TShopBasketCore,"* the grand total for the basket excluding shipping costs - * @var float","public function ResetAllShippingMarkers() - { - $this->GetBasketArticles()->ResetAllShippingMarkers(); - }" -TShopBasketCore,* @var float,"public function SetActivePaymentMethod($oShopPayment) - { - // make sure the shop payment selected is valid for the shipping group selected - $bMethodOk = false; - if (!is_null($oShopPayment)) { - $oList = $this->GetAvailablePaymentMethods(); - if (!is_null($oList) && $oList->IsInList($oShopPayment->id)) { - $bMethodOk = true; - $this->oActivePaymentMethod = $oShopPayment; - }" -TShopBasketCore,"* the total number of articles in the basket. - * - * @var float","public function GetActivePaymentMethod() - { - return $this->oActivePaymentMethod; - }" -TShopBasketCore,"* the total number of unique articles in the basket. - * - * @var float","public function ClearBasket() - { - $this->UnlockBasket(); - /** @var Request $request */ - $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest(); - if (null !== $request && true === $request->hasSession()) { - $request->getSession()->remove(self::SESSION_KEY_NAME); - }" -TShopBasketCore,* @var float,"public function OnUserLogoutHook() - { - $this->SetActivePaymentMethod(null); - $this->SetActiveShippingGroup(null); - //$this->RecalculateBasket(); - $this->SetBasketRecalculationFlag(); - }" -TShopBasketCore,* @var float,"public function OnUserLoginHook() - { - $this->SetBasketRecalculationFlag(); - // $this->RecalculateBasket(); - }" -TShopBasketCore,"* all order steps completed are stored in this array (systemname=>true) - * this way, each step can check if all previous steps have been properly completed. - * - * @var array","public function OnUserUpdatedHook() - { - $this->SetBasketRecalculationFlag(); - // $this->RecalculateBasket(); - }" -TShopBasketCore,"* the basket identifier is set when the basket is commited to db (in the order process) the first time - * this usually happens after the user enters from the basket overview page into the order process. - * - * @var string","public function CommitToSession($bForce = false) - { - // save copy to session - if (TShopBasket::BasketInSession()) { - $oTmp = TShopBasket::GetInstance(); - if (true === $bForce || $oTmp == $this) { - $oUser = TdbDataExtranetUser::GetInstance(); - $oUser->ObserverUnregister('oUserBasket'); - - /** @var Request $request */ - $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest(); - /** @var TPKgCmsSession $session */ - if (null !== $request && true === $request->hasSession()) { - $session = $request->getSession(); - $session->set(self::SESSION_KEY_NAME, $this); - }" -TShopBasketCore,* @var TdbShopWrappingCard|null,"public function GetBasketSumForVoucher(TShopVoucher $oVoucher) - { - $value = $this->GetBasketArticles()->GetBasketSumForVoucher($oVoucher); - if (true === $oVoucher->IsSponsored()) { - $value += $this->dCostShipping; - }" -TShopBasketCore,* @var TdbShopWrapping|null,"public function ApplyNoneSponsoredVoucherValueToItems(TdbShopVoucher $oVoucher, $dVoucherValue) - { - $this->GetBasketArticles()->ReducePriceForItemsAffectedByNoneSponsoredVoucher($oVoucher, $dVoucherValue); - }" -TShopBasketCore,"* use GetActiveVatList to access the property. - * - * @var TdbShopVatList|null","public function GetBasketQuantityForVoucher(TShopVoucher $oVoucher) - { - return $this->GetBasketArticles()->GetBasketQuantityForVoucher($oVoucher); - }" -TShopBasketCore,"* holds the articles of the basket - NOT: you should NOT access this directly. instead use GetBasketArticles(). - * - * @var TShopBasketArticleList|null","public function GetBasketSumForDiscount(TShopDiscount $oDiscount) - { - return $this->GetBasketArticles()->GetBasketSumForDiscount($oDiscount); - }" -TShopBasketCore,"* use GetActiveDiscounts to access the property. - * - * @var TShopBasketDiscountList|null","public function GetBasketQuantityForDiscount(TShopDiscount $oDiscount) - { - return $this->GetBasketArticles()->GetBasketQuantityForDiscount($oDiscount); - }" -TShopBasketCore,"* use GetActiveShippingGroup to access this property. - * - * @var TdbShopShippingGroup|null","public function AddItem(TShopBasketArticle $oItem) - { - $bWasAdded = false; - if ($oItem->IsBuyable()) { - $bWasAdded = $this->GetBasketArticles()->AddItem($oItem); - $this->SetBasketRecalculationFlag(); - }" -TShopBasketCore,"* use GetActivePaymentMethod to access the property. - * - * @var TdbShopPaymentMethod|null","public function updateCustomData(string $basketIdentifier, array $customData): bool - { - return $this->oBasketArticles->updateCustomData($basketIdentifier, $customData); - }" -TShopBasketCore,"* use GetActiveVouchers to access the property. - * - * @var TShopBasketVoucherList","public function FindItem($oItem) - { - return $this->FindItemByBasketItemKey($oItem->sBasketItemKey); - }" -TShopBasketCore,"* @FIXME private property that is never accessed. - * @var null","public function FindItemByBasketItemKey($sBasketItemKey) - { - return $this->GetBasketArticles()->FindItemWithProperty('sBasketItemKey', $sBasketItemKey); - }" -TShopBasketCore,"* as soon as an order request is issued, we try to create an order id, and - * store it in $_SESSION[self::SESSION_KEY_PROCESSING_BASKET]. This way, we can prevent a reload from - * generating a second order.","public function UpdateItemAmount(TShopBasketArticle $oItem) - { - $bWasUpdated = false; - if ($oItem->IsBuyable() || 0 == $oItem->dAmount) { - $bWasUpdated = $this->GetBasketArticles()->UpdateItemAmount($oItem); - $this->SetBasketRecalculationFlag(); - }" -TShopBasketCore,"* when creating an order we place the order id into this session var and keep it there - * this is usefull if you, for example, want to show the order as a print version to the user.","public function RemoveItem($sBasketItemKey) - { - $oRemoveItem = $this->FindItemByBasketItemKey($sBasketItemKey); - if ($oRemoveItem) { - $iOldAmount = $oRemoveItem->dAmount; - $oRemoveItem->ChangeAmount(0); - $this->UpdateItemAmount($oRemoveItem); - $oRemoveItem->ChangeAmount($iOldAmount); - }" -TShopBasketCore,"* @var int - * @psalm-var self::VOUCHER_*","public function RecalculateBasket() - { - $this->totalCostKnown = true; - ++$this->recalculationDepth; - - $this->SetBasketRecalculationFlag(false); - $this->dCostArticlesTotal = 0; - $this->dCostArticlesTotalAfterDiscounts = 0; - $this->dCostArticlesTotalAfterDiscountsWithoutNoneSponsoredVouchers = 0; - $this->dCostShipping = 0; - $this->dCostWrapping = 0; - $this->dCostWrappingCards = 0; - $this->dCostVouchers = 0; - $this->dCostDiscounts = 0; - $this->dCostVAT = 0; - $this->dCostTotal = 0; - $this->dCostPaymentMethodSurcharge = 0; - - $this->GetBasketArticles()->Refresh(); - $this->ResetAllShippingMarkers(); - - $this->iTotalNumberOfUniqueArticles = $this->GetBasketArticles()->Length(); - $this->dTotalNumberOfArticles = $this->GetBasketArticles()->dNumberOfItems; - $this->dCostArticlesTotal = $this->GetBasketArticles()->dProductPrice; - $this->dTotalWeight = $this->GetBasketArticles()->dTotalWeight; - $this->dTotalVolume = $this->GetBasketArticles()->dTotalVolume; - - $this->RecalculateDiscounts(); - $this->dCostArticlesTotalAfterDiscounts = $this->dCostArticlesTotal - $this->dCostDiscounts; - $this->dCostArticlesTotalAfterDiscountsWithoutNoneSponsoredVouchers = $this->dCostArticlesTotalAfterDiscounts; - - /* - * Reload vouchers so that their PostLoadHook is executed. If the user changed the currency, it needs to be - * adjusted in the vouchers, which is done automatically in the hook. This is a quick fix - the problem itself - * needs to be addressed in a wider scope. - */ - $this->reloadVouchers(); - - // now calculate the voucher values that act as discounts (vouchers NOT sponsored) - // We need to set the type here because the current method to remove invalid vouchers does not take a type which - // we can use to filter the vouchers being recalculated at the moment. - // This fixes https://github.com/chameleon-system/chameleon-system/issues/540 - $this->setVoucherTypeCurrentlyRecalculating(self::VOUCHER_NOT_SPONSORED); - $this->RecalculateNoneSponsoredVouchers(); - $this->setVoucherTypeCurrentlyRecalculating(self::VOUCHER_TYPE_NOT_SET); - - $this->dCostArticlesTotalAfterDiscounts = $this->dCostArticlesTotalAfterDiscounts - $this->dCostNoneSponsoredVouchers; - - $this->RecalculateShipping(); - $this->CalculatePaymentMethodCosts(); - - $this->RecalculateVAT(); - $this->dCostTotal = $this->dCostArticlesTotalAfterDiscounts + $this->dCostShipping + $this->dCostPaymentMethodSurcharge; - $this->setVoucherTypeCurrentlyRecalculating(self::VOUCHER_SPONSORED); - $this->RecalculateVouchers(); - $this->setVoucherTypeCurrentlyRecalculating(self::VOUCHER_TYPE_NOT_SET); - $this->dCostTotal = $this->dCostTotal - $this->dCostVouchers; // - $this->dCostDiscounts; - $this->dCostTotalWithoutShipping = $this->dCostTotal - $this->dCostShipping; - - /** - * since the payment method may have a basket value restriction, we need to check its validity again after - * we have the final basket value. If the final basket value invalidates the payment, then we need to call the recalculate again - * if this again results in an invalid payment method, then we throw an exception. - */ - $this->totalCostKnown = false; - - if (null !== $this->GetActivePaymentMethod() && false === $this->HasValidPaymentMethod()) { - if ($this->recalculationDepth > 1) { - throw new ErrorException(""there is no shipping group that has any payment methods available for the current basket due to basket value ({$this->dCostTotal}" -TShopBasketCore,"* if set to true, the basket will recalculate its contents on destruction or reinitialization - * use SetBasketRecalculationFlag and BasketRequiresRecalculation to access. - * - * @var bool","public function GetActiveVATList() - { - if (is_null($this->oActiveVatList)) { - $this->oActiveVatList = TdbShopVatList::GetList(); - $this->oActiveVatList->bAllowItemCache = true; - $this->oActiveVatList->GoToStart(); - }" -TShopBasketCore,* @var bool,"public function GetLargestVATObject() - { - $oActiveVatList = $this->GetActiveVATList(); - - $oMaxItem = null; - if (is_object($oActiveVatList)) { - $oMaxItem = $oActiveVatList->GetMaxItem(); - }" -TShopBasketCore,"* @var int - * @psam-var positive-int|0","public function GetArticlesAffectedByShippingType(TdbShopShippingType $oShippingType) - { - return $this->GetBasketArticles()->GetArticlesAffectedByShippingType($oShippingType); - }" -TShopBasketCore,* @return bool,"public function CreateOrder($sMessageConsumer, $bForcePayment = false) - { - $bOrderCreated = false; - $oOrder = false; - $bBasketVouchersValidated = $this->CheckBasketVoucherAvailable($sMessageConsumer); - $this->RecalculateBasket(); - $bSkipPaymentValidation = $bForcePayment; // skip the payment validation if the payment is to be forced - $this->getLogger()->info('create order'); - if ($this->CreateOrderAllowCreation($sMessageConsumer, $bSkipPaymentValidation) && $bBasketVouchersValidated) { - $this->getLogger()->info('create order: order creation permitted', array('basket' => $this, 'user' => TdbDataExtranetUser::GetInstance())); - // lock basket to prevent a second request from creating the order again. - $this->LockBasket(); - // now create order - /** @var $oOrder TdbShopOrder */ - $oOrder = TdbShopOrder::GetNewInstance(); - // copy base data - $oBasketCopy = clone $this; - $oOrder->LoadFromBasket($oBasketCopy); - - // we are not logged in yet, but trying to create the order... so we need to set allow edit all - $oOrder->AllowEditByAll(true); - $oOrder->Save(); - //'order_ident'=>$oBasket->sBasketIdentifier - if (!empty($oBasketCopy->sBasketIdentifier)) { // if the basket has no identifier, then we do not update the shop_order_basket record - $query = ""UPDATE `shop_order_basket` SET `shop_order_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($oOrder->id).""' WHERE `order_ident` = '"".MySqlLegacySupport::getInstance()->real_escape_string($oBasketCopy->sBasketIdentifier).""'""; - MySqlLegacySupport::getInstance()->query($query); - }" -TShopBasketCore,* added to allow subclasses to extend the method.,"public function OnPaymentSuccessHook(TdbShopOrder $oOrder, $oPaymentHandler, $sMessageConsumer) - { - $bPostPaymentOk = $oPaymentHandler->PostExecutePaymentHook($oOrder, $sMessageConsumer); - $oOrder->AllowEditByAll(true); - $oPaymentHandler->SaveUserPaymentDataToOrder($oOrder->id); - if (true === $bPostPaymentOk) { - // and export order for wawi - if not already exported (as may happen, if the payment handler manages export - if ($oOrder->fieldSystemOrderExportedDate <= '0000-00-00 00:00:00') { - if ($oOrder->ExportOrderForWaWiHook($oPaymentHandler)) { - $oOrder->MarkOrderAsExportedToWaWi(true); - }" -TShopBasketCore,"* mark the basket as dirty - will be recalculated as soon as the basket is loaded from sessin. - * - * @param bool $bRecalculationNeeded - * - * @return void","public function Render($sViewName = 'mini', $sViewType = 'Core', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - - $oShop = TdbShop::GetInstance(); - $oView->AddVar('oShop', $oShop); - $oView->AddVar('oBasket', $this); - $oView->AddVar('oBasketArticles', $this->GetBasketArticles()); - $oView->AddVar('oActiveVatList', $this->GetActiveVATList()); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType); - }" -TShopBasketCore,"* return true if the basket needs to be recalculated. - * - * @return bool","public function GetBasketContents() - { - $oClonedBasketArticles = clone $this->GetBasketArticles(); - - return $oClonedBasketArticles; - }" -TShopBasketCore,"* remove these in a later version - kept for compatibility reasons. - * - * @param string $sVar - * - * @return bool|null","public function getVoucherTypeCurrentlyRecalculating(): int - { - return $this->voucherTypeCurrentlyRecalculating; - }" -TShopBasketCore,"* remove these in a later version - kept for compatibility reasons. - * - * @param string $sVar - * @param string $sVal","public function AddVoucher(TdbShopVoucher $oVoucher, $sMessageHandler) - { - $bVoucherAdded = false; - $oMessageManager = TCMSMessageManager::GetInstance(); - - $oVoucherSeries = $oVoucher->GetFieldShopVoucherSeries(); - $aMessageData = $oVoucherSeries->GetObjectPropertiesAsArray(); - $aVoucherData = $oVoucher->GetObjectPropertiesAsArray(); - $aMessageData = array_merge($aMessageData, $aVoucherData); - - $cAllowUseOfVoucherResult = $oVoucher->AllowUseOfVoucher(); - if (TdbShopVoucher::ALLOW_USE != $cAllowUseOfVoucherResult) { - if (TdbShopVoucher::USE_ERROR_NOT_VALID_FOR_CUSTOMER_GROUP_MISSING_LOGIN == $cAllowUseOfVoucherResult || - TdbShopVoucher::USE_ERROR_NOT_VALID_FOR_CUSTOMER_MISSING_LOGIN == $cAllowUseOfVoucherResult) { - $oExtranet = TdbDataExtranet::GetInstance(); - if (!is_null($oExtranet)) { - $aMessageData['sLinkLoginStart'] = 'GetLinkLoginPage().'"">'; - $aMessageData['sLinkLoginEnd'] = ''; - }" -TShopBasketCore,"* set the active shipping group - return false, if an invalid group is selected. - * - * @param TdbShopShippingGroup|null $oShippingGroup - * - * @return bool","public function RemoveVoucher($sBasketVoucherKey, $sMessageHandler) - { - $bRemoved = $this->GetActiveVouchers()->RemoveItem('sBasketVoucherKey', $sBasketVoucherKey); - $oMessageManager = TCMSMessageManager::GetInstance(); - if ($bRemoved) { - $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-REMOVED'); - $this->SetBasketRecalculationFlag(); - }" -TShopBasketCore,"* return the active shipping group - will set the shipping group to the default group, if none is set. - * - * @return TdbShopShippingGroup|null","public function GetVoucherList() - { - if (!is_null($this->GetActiveVouchers())) { - return clone $this->GetActiveVouchers(); - }" -TShopBasketCore,"* return the active shipping group - will NOT set the shipping group to the default group, if none is set. - * - * @return TdbShopShippingGroup|null","public function GetDiscountList() - { - return clone $this->GetActiveDiscounts(); - }" -TShopBasketCore,* @return TdbShopShippingGroupList,"public function CommitCopyToDatabase($bCreateNewIdent = false, $stepSystemName = '') - { - $time = time(); - $user = $this->getExtranetUserProvider()->getActiveUser(); - $request = $this->getRequest(); - if (null === $request || false === $request->hasSession()) { - $sessionCopy = array(); - $sessionId = ''; - }" -TShopBasketCore,"* return all payment methods for the active shipping group. - * - * @return TdbShopPaymentMethodList|null","public function ValidateBasketContents($sMessageManager = null) - { - /* - * do not validate basket if returning from an interrupted payment call since the order - * creation has already begun (items saved, stock reduced). revalidating may remove items from the basket due to zero stock - * which is of course not intended since the stock has been reserved via the creation process of the order - * - */ - if (TdbShopPaymentHandler::ExecutePaymentInterrupted()) { - return true; - }" -TShopBasketCore,"* return all payment methods for the active shipping group that are selectable by the user. - * - * @return TdbShopPaymentMethodList|null","public function GetNextAvailableDiscount() - { - $oNextDiscount = null; - $oUser = TdbDataExtranetUser::GetInstance(); - // $oDiscountList = TdbShopDiscountList::GetActiveDiscountList(""`shop_discount`.`restrict_to_value_from` > "".MySqlLegacySupport::getInstance()->real_escape_string($this->dCostArticlesTotal),""`shop_discount`.`restrict_to_value_from` ASC""); - $oDiscountList = $this->GetActiveDiscounts(); - $oDiscountList->GoToStart(); - $aDiscountId = array(); - while ($oDiscount = $oDiscountList->Next()) { - $aDiscountId[] = ""(`shop_discount`.`id` != '"".MySqlLegacySupport::getInstance()->real_escape_string($oDiscount->id).""' AND `shop_discount`.`restrict_to_value_from` >= '"".MySqlLegacySupport::getInstance()->real_escape_string($oDiscount->sqlData['restrict_to_value_from']).""' AND `shop_discount`.`restrict_to_articles_from` >= '"".MySqlLegacySupport::getInstance()->real_escape_string($oDiscount->sqlData['restrict_to_articles_from']).""')""; - }" -TShopBasketCore,* @return void,"public function LockBasket() - { - $_SESSION[self::SESSION_KEY_PROCESSING_BASKET] = '1'; - }" -TShopBasketCore,"* set the active payment method. return true on succes - false if the method is not allowed - * Note: you hast set a shipping group first! - * - * @param TdbShopPaymentMethod|null $oShopPayment - * - * @return bool","public function UnlockBasket() - { - if (array_key_exists(self::SESSION_KEY_PROCESSING_BASKET, $_SESSION)) { - unset($_SESSION[self::SESSION_KEY_PROCESSING_BASKET]); - }" -TShopBasketCore,"* return the active payment method. - * - * @return TdbShopPaymentMethod|null","public function OnBasketItemUpdateEvent($oBasketItemChanged) - { - $event = new BasketItemEvent( - TdbDataExtranetUser::GetInstance(), - $this, - $oBasketItemChanged - ); - $this->getEventDispatcher()->dispatch($event, ShopEvents::BASKET_UPDATE_ITEM); - }" -TShopBasketCore,"* deletes contents of basket. - * - * @return void","public function OnBasketItemDeleteEvent($oBasketItemRemoved) - { - $event = new BasketItemEvent( - TdbDataExtranetUser::GetInstance(), - $this, - $oBasketItemRemoved - ); - $this->getEventDispatcher()->dispatch($event, ShopEvents::BASKET_DELETE_ITEM); - }" -TShopBasketCore,@var Request $request,"public function custom_wakeup() - { - $requestInfoService = $this->getRequestInfoService(); - if ($requestInfoService->isBackendMode()) { - return; - }" -TShopBasketCore,"* @param bool $bReset - * @param bool $bReloadFromSession - * - * @return TShopBasket - * return the current basket object - * - * @deprecated use chameleon_system_shop.shop_service getActiveBasket and resetBasket instead","public function sessionWakeupHook() - { - $this->custom_wakeup(); - }" -TShopBasketCore,@var $shopService ShopServiceInterface,"public function myOrderDetailHandlerFactory() - { - /** @var Request $request */ - $request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest(); - - return new TPkgShopViewMyOrderDetails( - new TPkgShopViewMyOrderDetailsDbAdapter(\ChameleonSystem\CoreBundle\ServiceLocator::get( - 'database_connection' - )), - new TPkgShopViewMyOrderDetailsSessionAdapter($request->getSession()) - ); - }" -is,"* The object is used to collect all articles in the basket to which the Discount applies. the object is managed by - * TShopBasket. - * - * @psalm-suppress InvalidReturnType - * @FIXME This class is not implemented","public function AllowDiscountForContentValue() - { - // Not yet implemented - }" -is,* @var array,"public function GetDiscountValue() - { - // Not yet implemented - }" -TShopBasketDiscountCoreList,* @return TdbShopDiscount|bool,"public function next(): TdbShopDiscount|bool - { - return parent::Next(); - }" -TShopBasketDiscountCoreList,"* return the total discount value for all active discounts. note that the method will fetch the current basket - * using the baskets singleton factory. - * - * @return float","public function GetDiscountValue() - { - $dValue = 0; - $iTmpPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oDiscount = $this->Next()) { - $dValue += $oDiscount->GetValue(); - }" -TShopBasketDiscountCoreList,"* Removes all discounts from the basket, that are not valid based on the contents of the basket and the current user - * Returns the number of discounts removed. - * - * @param string $sMessangerName - optional message manager to which we output why a discount was removed - * - * @return void","public function RemoveInvalidDiscounts($sMessangerName = null) - { - // since the min value of the basket for which a discount may work is affected by other discounts, - // we need to remove the discounts first, and then add them one by one back to the basket - // we suppress the add messages, but keep the negative messages - - $oMessageManager = TCMSMessageManager::GetInstance(); - - // get copy of discounts - $aDiscountList = $this->_items; - $this->Destroy(); - foreach ($aDiscountList as $iDiscountKey => $oDiscount) { - /** @var $oDiscount TdbShopDiscount */ - $cDiscountAllowUseCode = $oDiscount->AllowUseOfDiscount(); - if (TdbShopDiscount::ALLOW_USE == $cDiscountAllowUseCode) { - $this->AddItem($oDiscount); - }" -TShopBasketVoucherCoreList,"* Adds a voucher to the list. note that it wil not check if the voucher is valid (this must be done by the calling method) - * Returns the voucher key generated when adding the voucher. - * - * @param TdbShopVoucher $oVoucher - * - * @return void","public function AddItem($oVoucher) - { - $oVoucher->sBasketVoucherKey = $this->GetUniqueItemKey(); - parent::AddItem($oVoucher); - }" -TShopBasketVoucherCoreList,"* return a unique sBasketVoucherKey for the current list. - * - * @return string","public function next(): TdbShopVoucher|bool - { - return parent::Next(); - }" -TShopBasketVoucherCoreList,"* return voucher. - * - * @return TdbShopVoucher|bool","public function GetVoucherValue($bSponsoredVouchers = false) - { - $dValue = 0; - $oBasket = TShopBasket::GetInstance(); - - $iTmpPointer = $this->getItemPointer(); - $this->GoToStart(); - $maxValueShippingCostAdjustment = true === $bSponsoredVouchers ? $oBasket->dCostShipping : 0; - while ($oVoucher = $this->Next()) { - if (($bSponsoredVouchers && $oVoucher->IsSponsored()) || (false == $bSponsoredVouchers && false == $oVoucher->IsSponsored())) { - $dMaxValue = ($oBasket->dCostArticlesTotalAfterDiscounts + $maxValueShippingCostAdjustment) - $dValue; - $dValue += $oVoucher->GetValue(true, $dMaxValue, $bSponsoredVouchers); - }" -TShopBasketVoucherCoreList,"* return the total voucher value for all active vouchers. note that the method will fetch the current basket - * using the baskets singleton factory. - * - * @param bool $bSponsoredVouchers - set to true: only sponsored vouchers, false only none sponsored vouchers - * - * @return float","public function RemoveInvalidVouchers($sMessangerName, $oBasket = null) - { - // since the min value of the basket for which a voucher may work is affected by other vouchers, - // we need to remove the vouchers first, and then add them one by one back to the basket - // we suppress the add messages, but keep the negative messages - - if (is_null($oBasket)) { - $oBasket = TShopBasket::GetInstance(); - }" -TShopBasketVoucherCoreList,"* Removes all vouchers from the basket, that are not valid based on the contents of the basket and the current user - * Returns the number of vouchers removed. - * - * @param string $sMessangerName - * @param TShopBasket $oBasket - * - * @return void","public function HasFreeShippingVoucher() - { - $bHasFreeShipping = false; - $tmpCurrentPointer = $this->getItemPointer(); - $this->GoToStart(); - - while (!$bHasFreeShipping && ($oItem = $this->Next())) { - $oVoucherSeries = $oItem->GetFieldShopVoucherSeries(); - if ($oVoucherSeries->fieldFreeShipping) { - $bHasFreeShipping = true; - }" -TShopBreadcrumbItem,"* item is used to simulate a breadcrumb node. - * - * @template TItem of TCMSRecord","public function GetName() - { - return $this->oItem->GetName(); - }" -TShopBreadcrumbItem,* @var TItem,"public function GetLink() - { - }" -TShopBreadcrumbItem,* @var string,"public function GetTarget() - { - return '_self'; - }" -TShopBreadcrumbItemArticle,"* item is used to simulate a breadcrumb node. - * - * @extends TShopBreadcrumbItem","public function GetLink() - { - $oShop = TdbShop::GetInstance(); - $oActiveCategory = $oShop->GetActiveCategory(); - $iCategoryId = null; - if (!is_null($oActiveCategory)) { - $iCategoryId = $oActiveCategory->id; - }" -TShopBreadcrumbItemArticle,* @return string,"public function GetName() - { - return $this->oItem->GetBreadcrumbName(); - }" -TShopBreadcrumbItemCategory,"* item is used to simulate a breadcrumb node. - * - * @extends TShopBreadcrumbItem","public function GetLink($bForcePortal = false) - { - return $this->oItem->GetLink($bForcePortal); - }" -TShopBreadcrumbItemCategory,"* @param bool $bForcePortal - * @return string","public function GetName() - { - return $this->oItem->GetBreadcrumbName(); - }" -TShopBreadcrumbItemManufacturer,* @extends TShopBreadcrumbItem,"public function __construct(TdbShopManufacturer $manufacturer) - { - $this->oItem = $manufacturer; - }" -TShopBreadcrumbItemManufacturer,"* @param bool $bForcePortal - * {@inheritDoc}","public function GetLink($bForcePortal = false) - { - return $this->oItem->GetLinkProducts(); - }" -TShopCategoryTree,"* Contains all child categories as TShopCategoryTree. - * - * @var TIterator","public function ResetCounter() - { - $this->iAllItemCount = 0; - $this->iItemCount = 0; - if (!is_null($this->oChildCategoryTreeList)) { - $this->oChildCategoryTreeList->GoToStart(); - while ($oChildCategoryTree = $this->oChildCategoryTreeList->Next()) { - $oChildCategoryTree->ResetCounter(); - }" -TShopCategoryTree,"* Contains the real category for the tree. - * - * @var TdbShopCategory","public function Render($sListFilterItemId = false, $bHideEmptyCategories = false, $bShowArticleCount = false, $iLevelCount = 1) - { - $sHtml = ''; - $sCategoryNameHtml = ''; - if (!is_null($this->oRealCategory)) { - $sCategoryNameHtml = $this->RenderCategoryName($sListFilterItemId, $bShowArticleCount, $iLevelCount); - }" -TShopCategoryTree,* @var bool,"public function RenderChildCategories($sListFilterItemId = false, $bHideEmptyCategories = false, $bShowArticleCount = false, $iLevelCount = 1) - { - $sHtml = ''; - if (!is_null($this->oChildCategoryTreeList)) { - $this->oChildCategoryTreeList->GoToStart(); - while ($oChildCategoryTree = $this->oChildCategoryTreeList->Next()) { - $sHtml .= $oChildCategoryTree->Render($sListFilterItemId, $bHideEmptyCategories, $bShowArticleCount, $iLevelCount); - }" -TShopCategoryTree,"* Contains the item count for this category tree. - * - * @var int","public function GetAddFilterURL($sListFilterItemId) - { - $oActiveListFilter = TdbPkgShopListfilter::GetActiveInstance(); - $aURLData = $oActiveListFilter->GetCurrentFilterAsArray(); - $aURLData = $this->ClearOtherCategoryTreeFilter($aURLData, $sListFilterItemId); - $aURLData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA][$sListFilterItemId][] = $this->oRealCategory->id; - $aURLData[TdbPkgShopListfilter::URL_PARAMETER_IS_NEW_REQUEST] = '1'; - - return $this->getActivePageService()->getLinkToActivePageRelative($aURLData); - }" -TShopCategoryTree,"* Contains item count for this category tree and for all child category trees. - * - * @var int","public function AddItemCount($sCategoryId, $iArticleCount) - { - $bSet = false; - if (array_key_exists($sCategoryId, $this->aContainingChildCategories)) { - $this->iAllItemCount = $this->iAllItemCount + $iArticleCount; - if (!is_null($this->oChildCategoryTreeList)) { - $this->oChildCategoryTreeList->GoToStart(); - while ($oChildCategoryTree = $this->oChildCategoryTreeList->Next()) { - if (!$bSet) { - $bSet = $oChildCategoryTree->AddItemCount($sCategoryId, $iArticleCount); - }" -TShopCategoryTree,"* Contains the id of the real category if exists. - * If no real category exits for the category tree then it contains random id. - * - * @var string","public function MarkActiveCategories($aActiveCategories) - { - $this->bIsActive = false; - if (in_array($this->id, $aActiveCategories)) { - $this->bIsActive = true; - }" -MTShopArticleDetails,* @var string|null,"public function Init() - { - parent::Init(); - if ($this->global->UserDataExists('imageid')) { - $this->sActiveImageId = $this->global->GetUserData('imageid'); - }" -MTShopArticleDetails,* @var array,"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('oObject', 'TdbShopArticle', $this->oActiveArticle); - }" -MTShopArticleDetails,* @var TdbShopArticle,"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** - * @var $activeArticle TdbShopArticle - */ - $activeArticle = $oVisitor->GetSourceObject('oObject'); - - $oVisitor->SetMappedValue('oObject', $activeArticle); - $oVisitor->SetMappedValue('activeArticleUrl', $activeArticle->getLink(true)); - $oVisitor->SetMappedValue('sActiveImageId', $this->sActiveImageId); - if ($this->oActiveArticle && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger('shop_article', $this->oActiveArticle->id); - if ($this->oActiveArticle->IsVariant()) { - $oCacheTriggerManager->addTrigger('shop_article', $this->oActiveArticle->fieldVariantParentId); - }" -MTShopArticleDetails,* @var TdbShopCategory,"public function _GetCacheParameters() - { - $cacheParam = parent::_GetCacheParameters(); - - $activePortal = $this->getPortalDomainService()->getActivePortal(); - $cacheParam['cms_portal_id'] = $activePortal->id; - if ($this->oActiveArticle) { - $cacheParam['sArticleId'] = $this->oActiveArticle->id; - }" -MTShopArticleDetails,* {@inheritdoc},"public function _AllowCache() - { - return true; - }" -MTShopArticleQuestionEndPoint,"* @var array - * @psalm-var array","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oMsgManager = TCMSMessageManager::GetInstance(); - - $oVisitor->SetMappedValue('sFormMessages', $oMsgManager->RenderMessages($this->sModuleSpotName)); - reset($this->aInputDefinition); - $aErrors = array(); - foreach ($this->aInputDefinition as $sField => $aFieldDef) { - $sError = $oMsgManager->RenderMessages($this->sModuleSpotName.'-'.$sField); - if (!empty($sError)) { - $aErrors[$sField] = $sError; - }" -MTShopCategoryDetails,* @var TdbShopCategory,"public function Init() - { - parent::Init(); - $this->oActiveCategory = $this->getShopService()->getActiveCategory(); - if (null === $this->oActiveCategory) { - $homeUrl = $this->getPageService()->getLinkToPortalHomePageRelative(); - $this->getRedirectService()->redirect($homeUrl, Response::HTTP_MOVED_PERMANENTLY); - }" -MTShopCategoryDetails,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('oObject', 'TdbShopCategory', $this->oActiveCategory); - }" -MTShopCategoryDetails,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - $oActiveCategory = $oVisitor->GetSourceObject('oObject'); - if ($oActiveCategory && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oActiveCategory->table, $oActiveCategory->id); - }" -MTShopCategoryDetails,* {@inheritdoc},"public function _AllowCache() - { - return true; - }" -MTShopCategoryDetails,* {@inheritdoc},"public function _GetCacheParameters() - { - $parameter = parent::_GetCacheParameters(); - - if ($this->oActiveCategory) { - $parameter['sCategoryId'] = $this->oActiveCategory->id; - }" -MTShopManufacturerDetails,* @var TdbShopManufacturer,"public function Init() - { - parent::Init(); - $this->oActiveManufacturer = TdbShop::GetActiveManufacturer(); - if (null === $this->oActiveManufacturer) { - if (null === $this->getPortalDomainService()->getActivePortal()) { - $this->oActiveManufacturer = TdbShopManufacturer::GetNewInstance(); - }" -MTShopManufacturerDetails,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('oObject', 'TdbShopManufacturer', $this->oActiveManufacturer); - }" -MTShopManufacturerDetails,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oManufacturer = $oVisitor->GetSourceObject('oObject'); - $oVisitor->SetMappedValue('oObject', $oManufacturer); - if ($oManufacturer && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oManufacturer->table, $oManufacturer->id); - }" -MTShopManufacturerDetails,* {@inheritdoc},"public function _AllowCache() - { - return true; - }" -MTShopManufacturerDetails,* {@inheritdoc},"public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - - if ($this->oActiveManufacturer) { - $parameters['sManufacturerId'] = $this->oActiveManufacturer->id; - }" -MTShopOrderHistory,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oUser = TdbDataExtranetUser::GetInstance(); - $oVisitor->SetMappedValue('sDetailLinkCaption', 'Details'); - if (null === $oUser->id) { - return; - }" -MTShopOrderHistory,"* get the value list for the whole order list. - * - * @param TdbShopOrderList $oOrderList - * @param bool $bCachingEnabled - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return array","public function _AllowCache() - { - return false; - }" -MTFooterCategory,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapperVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oCacheTriggerManager->addTrigger('pkg_shop_footer_category'); - $oFooterList = TdbPkgShopFooterCategoryList::GetListForShopId($this->getShopService()->getId()); - $aTree = array(); - while ($oFooter = $oFooterList->Next()) { - $aTree[] = $this->getSubNavi($oFooter); - }" -MTFooterCategory,"* @param TdbPkgShopFooterCategory $oFooter - * - * @return array","public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - if (!is_array($parameters)) { - $parameters = array(); - }" -MTFooterCategory,* {@inheritdoc},"public function _AllowCache() - { - return true; - }" -MTShopArticleCatalogCoreEndPoint,"* the Produkt catalog -> shows all articles of a given category, and the detail item view... - * IMPORTANT: do not extend this class. instead extend from MTShopArticleCatalogCore. - * - * @deprecated since 6.2.0 - no longer used. - *","public function __sleep() - { - $aSleep = parent::__sleep(); - $aSleep[] = 'iPage'; - $aSleep[] = 'iPageSize'; - $aSleep[] = 'iItemId'; - $aSleep[] = 'iCategoryId'; - $aSleep[] = 'aFilter'; - $aSleep[] = 'iActiveShopModuleArticlelistOrderbyId'; - - return $aSleep; - }" -MTShopArticleCatalogCoreEndPoint,"* current page. - * - * @var int","public function ChangePage($iListIdent = null) - { - }" -MTShopArticleCatalogCoreEndPoint,"* number of records per page. - * - * @var int","public function ChangePageAjax($iListIdent = null) - { - $oResponse = new MTShopArticleListResponse(); - /** @var $oResponse MTShopArticleListResponse */ - if (null === $iListIdent) { - $oGlobal = TGlobal::instance(); - $iListIdent = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME); - }" -MTShopArticleCatalogCoreEndPoint,"* current item. - * - * @var string","public function Init() - { - parent::Init(); - $this->oModuleConf = TdbShopArticleCatalogConf::GetNewInstance(); - $this->oModuleConf->LoadFromField('cms_tpl_module_instance_id', $this->instanceID); - $this->iPageSize = $this->GetActivePageSize(); - - $oCategory = TdbShop::GetActiveCategory(); - if (is_object($oCategory)) { - $this->iActiveShopModuleArticlelistOrderbyId = $this->oModuleConf->GetDefaultOrderBy($oCategory); - }" -MTShopArticleCatalogCoreEndPoint,"* current category - if not set and an item is set, then the items primary category will be used. - * if neither item nor category is set, then the first root category will be used. - * - * @var string","public function Execute() - { - parent::Execute(); - // Initialize objects - $this->data['oActiveCategory'] = self::GetActiveCategory(); - $this->data['oActiveArticle'] = self::GetActiveItem(); - $this->data['oModuleConf'] = $this->oModuleConf; - // load list... - - if (!is_null($this->data['oActiveArticle'])) { - // show detail page if we have an active article - $this->ViewArticleHook(); - }" -MTShopArticleCatalogCoreEndPoint,"* holds the current order by id. - * - * @var string","public function WriteReview() - { - // validate user input... - $bDataValide = false; - $oMsgManager = TCMSMessageManager::GetInstance(); - $oGlobal = TGlobal::instance(); - $aUserData = $oGlobal->GetUserData(TdbShopArticleReview::INPUT_BASE_NAME); - if (is_array($aUserData)) { - $bDataValide = true; - - $sCaptcha = ''; - if (array_key_exists('captcha', $aUserData)) { - $sCaptcha = trim($aUserData['captcha']); - }" -MTShopArticleCatalogCoreEndPoint,"* any filter restrictions for the list. - * - * @var array","public function GetActiveShopModuleArticlelistOrderbyId($sInstanceId = '') - { - $iActiveShopModuleArticlelistOrderbyId = null; - $oGlobal = TGlobal::instance(); - if ($oGlobal->UserDataExists(self::URL_ORDER_BY)) { - /** @var string $iActiveShopModuleArticlelistOrderbyId */ - $iActiveShopModuleArticlelistOrderbyId = $oGlobal->GetUserData(self::URL_ORDER_BY); - }" -MTShopArticleCatalogCoreEndPoint,"* the current article list. - * - * @var TdbShopArticleList","public function GetActiveOrderByString($sDefaultActiveShopModuleArticlelistOrderbyId = null, $sInstanceId = '') - { - static $oOrderBy = null; - if (is_null($oOrderBy)) { - // remove default order by - for performance reason we should be allowed to sort by nothing - $sOrder = ''; //`shop_article`.`list_rank` DESC, `shop_article`.`name` ASC'; - $iActiveShopModuleArticlelistOrderbyId = $this->GetActiveShopModuleArticlelistOrderbyId($sInstanceId); - if (is_null($iActiveShopModuleArticlelistOrderbyId)) { - $iActiveShopModuleArticlelistOrderbyId = $sDefaultActiveShopModuleArticlelistOrderbyId; - }" -MTShopArticleCatalogCoreEndPoint,"* set this to false if you need to prevent caching of the list/item. - * - * @var bool","public function _AllowCache() - { - return false; // we currently cannot cache the list, since each list has a unique state key per user which would be include in the cached result (#26067) - }" -MTShopArticleCatalogCoreEndPoint,"* module conf data. - * - * @var TdbShopArticleCatalogConf","public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - - $parameters['sActivePageId'] = $this->getActivePageService()->getActivePage()->id; - $parameters['iPage'] = $this->iPage; - $parameters['iActiveShopModuleArticlelistOrderbyId'] = $this->iActiveShopModuleArticlelistOrderbyId; - $parameters['iPageSize'] = $this->iPageSize; - $parameters['iItemId'] = $this->iItemId; - $parameters['iCategoryId'] = $this->iCategoryId; - $parameters['aFilter'] = md5(serialize($this->aFilter)); - $aAdditionalParameters = TdbShopArticleList::GetGlobalArticleListCacheKeyParameters(); - if (count($aAdditionalParameters)) { - foreach ($aAdditionalParameters as $sKey => $sVal) { - $parameters[$sKey] = $sVal; - }" -MTShopArticleCatalogCoreEndPoint,"* add your custom methods as array to $this->methodCallAllowed here - * to allow them to be called from web.","public function _GetCacheTableInfos() - { - $aClearCacheInfo = parent::_GetCacheTableInfos(); - - if (!is_array($aClearCacheInfo)) { - $aClearCacheInfo = array(); - }" -MTShopBasketCoreEndpoint,"* The module manages access to the basket object. - * IMPORTANT: do not extend directly form this class. use the ""cms Klassen-vererbungsmanager"" (pkg_cms_class_manager) instead - * or, if you have to, extend from ""MTShopBasketCore"". -/*","public function Init() - { - parent::Init(); - - // load affiliate code if passed as param - $oShop = TdbShop::GetInstance(); - $oGlobal = TGlobal::instance(); - if ($oGlobal->UserDataExists($oShop->fieldAffiliateParameterName)) { - $sCode = $oGlobal->GetUserData($oShop->fieldAffiliateParameterName); - if (!empty($sCode)) { - $oShop->SetAffiliateCode($sCode); - }" -MTShopBasketCoreEndpoint,* the request field names that the basket objects understands.,"public function Execute() - { - parent::Execute(); - $this->data['oBasket'] = $this->getShopService()->getActiveBasket(); - - return $this->data; - }" -MTShopBasketCoreEndpoint,* the request field names cut into the diefferent parts.,"public function JumpToBasketPage() - { - $bJumpAsFarAsPossible = false; - if ('1' === $this->getInputFilterUtil()->getFilteredInput('bJumpAsFarAsPossible')) { - $bJumpAsFarAsPossible = true; - }" -MTShopBasketCoreEndpoint,* @var null|bool,"public function TransferFromNoticeList($aArticleIdsToMove = null, $aKeepOnNoticeList = null, $sMessageHandler = null) - { - $oGlobal = TGlobal::instance(); - $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); - if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { - $aIdList = $aRequestData[self::URL_ITEM_ID_NAME]; - if (!is_array($aIdList)) { - $aIdList = array($aIdList); - }" -MTShopBasketCoreEndpoint,"* clear all products from the basket and redirect to active page. - * - * @return void","public function RemoveFromNoticeListAjax($aArticleIdsToMove = null, $sMessageHandler = null, $bIsInteralCall = false) - { - return $this->RemoveFromNoticeList($aArticleIdsToMove, $sMessageHandler, $bIsInteralCall, true); - }" -MTShopBasketCoreEndpoint,"* method looks for affiliate parter codes passed to the website (if none are set yet). - * if a code is found, it is stored in the session. note: we check only ONCE for a session - * if suche a code is passed! - * - * @return void","public function RemoveFromNoticeList($aArticleIdsToMove = null, $sMessageHandler = null, $bIsInteralCall = false, $bIsAjaxCall = false) - { - $oGlobal = TGlobal::instance(); - $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); - if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { - $aArticleIdsToMove = $aRequestData[self::URL_ITEM_ID_NAME]; - if (!is_array($aArticleIdsToMove)) { - $aArticleIdsToMove = array($aArticleIdsToMove); - }" -MTShopBasketCoreEndpoint,* {@inheritdoc},"public function TransferToNoticeList($iArticleId = null, $iAmount = null, $sMessageHandler = null, $bIsInternalCall = false) - { - $this->RemoveFromBasket($iArticleId, $sMessageHandler, true); - $this->AddToNoticeList($iArticleId, $iAmount, $sMessageHandler, $bIsInternalCall); - }" -MTShopBasketCoreEndpoint,"* call the method to jump to the basket detail page. it will store the calling URL in the session, so - * that it becomes possible to jump back to this page from the basket. - * - * @throws RouteNotFoundException - * - * @return void","public function AddToNoticeList($iArticleId = null, $iAmount = null, $sMessageHandler = null, $bIsInternalCall = false) - { - $oGlobal = TGlobal::instance(); - $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); - if (is_null($iArticleId) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { - $iArticleId = $aRequestData[self::URL_ITEM_ID_NAME]; - if (empty($iArticleId)) { - $iArticleId = null; - }" -MTShopBasketCoreEndpoint,@var $oNode TCMSTreeNode,"public function RemoveVoucher($sBasketVoucherKey = null, $sMessageHandler = null, $bIsInternalCall = false) - { - $oMessageManager = TCMSMessageManager::GetInstance(); - $aBasketData = $this->global->GetUserData(self::URL_REQUEST_PARAMETER); - - $bWasRemoved = true; - - if (is_null($sBasketVoucherKey) && array_key_exists(self::URL_VOUCHER_BASKET_KEY, $aBasketData)) { - $sBasketVoucherKey = $aBasketData[self::URL_VOUCHER_BASKET_KEY]; - }" -MTShopBasketCoreEndpoint,"* returns the url to the current page. - * - * @return string","public function AddToBasket($aRequestData = null) - { - $this->UpdateBasketItem($aRequestData, true); - }" -MTShopBasketCoreEndpoint,"* moves an item from the notice list to the basket - * $aArticleIdsToMove should have the form 'id'=>amount - * any data not passed as a parameter is fetched from get/post - * the data passed via get/post such as self::URL_ITEM_ID can be an array or a value. - * example: []"" value="""" /> - * []"" value=""2"" /> - * []"" value="""" /> - * []"" value=""1"" /> - * or, if you only want to transfer one item: - * "" value="""" /> - * "" value=""1"" />. - * - * by default the articles will be removed from the notice list. if you want to keep some of them, make sure to add the following - * "" value=""copy"" /> - * OR - * []"" value=""copy"" /> - * []"" value=""move"" /> - * if you are moving more than one, and want to keep the first and move the second - * - * @param array $aArticleIdsToMove - * @param array $aKeepOnNoticeList - * @param string $sMessageHandler - * - * @return void","public function AddToBasketAjax($aRequestData = null) - { - $this->UpdateBasketItem(null, true, true, true); - - // we do not redirect - so we need to recalculate basket by hand - $oBasket = TShopBasket::GetInstance(); - $oBasket->RecalculateBasket(); - - $oResponse = new stdClass(); - $oResponse->sNotificationWindow = TTools::CallModule('MTShopBasket', 'system'); - $oResponse->sMiniBasket = TTools::CallModule('MTShopBasket', 'mini'); - - return $oResponse; - }" -MTShopBasketCoreEndpoint,"* @param array $aArticleIdsToMove - * @param string $sMessageHandler - * @param bool $bIsInteralCall - * - * @return null|array","public function UpdateBasketItems($aRequestData = null, $bAddAmountToExistingAmount = false, $bIsInternalCall = false) - { - $oMessage = TCMSMessageManager::GetInstance(); - $oGlobal = TGlobal::instance(); - if (is_null($aRequestData)) { - $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); - }" -MTShopBasketCoreEndpoint,"* remove item from notice list. - * - * @param array $aArticleIdsToMove - * @param string $sMessageHandler - * @param bool $bIsInteralCall - * @param bool $bIsAjaxCall - * - * @return null|array","public function RemoveFromBasket($iArticleId = null, $sConsumer = null, $bIsInternalCall = false) - { - $oGlobal = TGlobal::instance(); - $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); - if (!is_array($aRequestData)) { - $aRequestData = array(); - }" -MTShopBasketCoreEndpoint,@var $oArticle TdbShopArticle,"public function UpdateBasketItem($aRequestData = null, $bAddAmountToExistingAmount = false, $bIsInternalCall = false, $bWriteMessageOnInternalCall = false) - { - $request = $this->getCurrentRequest(); - if (null === $request || false === $request->hasSession()) { - return false; - }" -MTShopBasketCoreEndpoint,"* moves or copies one or more articles from the basket to the notice list. products to be moved must be passed. - * - * @param int $iArticleId - if you pass null, it will attempt to fetch the item id from post - * @param int $iAmount - amount to add - * @param string $sMessageHandler - info passed to this handler - uses the default message consumer for the shop if non passed (can also be passed via get/post) - * @param bool $bIsInternalCall - * - * @return void","public function _AllowCache() - { - if (0 != TShopBasket::GetInstance()->iTotalNumberOfUniqueArticles) { - return false; - }" -MTShopBasketCoreEndpoint,"* insert an item into the notice list. - * - * @param int $iArticleId - if you pass null, it will attempt to fetch the item id from post - * @param int $iAmount - amount to add - * @param string $sMessageHandler - info passed to this handler - uses the default message consumer for the shop if non passed (can also be passed via get/post) - * @param bool $bIsInternalCall - * - * @return void","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/shopBasket')); - $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('common/userInput')); - - return $aIncludes; - }" -MTShopBasketCoreEndpoint,@var $oItem TdbShopArticle,"public function GetPostRenderVariables(): array - { - $variables = parent::GetPostRenderVariables(); - $variables['basketUrl'] = $this->getShopService()->getBasketLink(false); - - return $variables; - }" -MTShopBreadcrumbCore,@var $breadcrumb TCMSPageBreadcrumb,"public function Execute() - { - parent::Execute(); - - $oShop = TdbShop::GetInstance(); - $oActiveCategory = $oShop->GetActiveCategory(); - $oActiveItem = $oShop->GetActiveItem(); - - // if we have an active category... generate path there - if (!is_null($oActiveCategory) || !is_null($oActiveItem)) { - // we want to use the normal breadcrum view... so we need to generate a breadcrumb class that can simulate the required methos (getlink, gettarget and getname) - $breadcrumb = new TCMSPageBreadcrumb(); - /** @var $breadcrumb TCMSPageBreadcrumb */ - $aList = array(); - - if (!is_null($oActiveCategory)) { - $aCatPath = TdbShop::GetActiveCategoryPath(); - foreach (array_keys($aCatPath) as $iCatId) { - $oItem = new TShopBreadcrumbItemCategory(); - /** @var $oItem TShopBreadcrumbItemCategory */ - $oItem->oItem = $aCatPath[$iCatId]; - $aList[] = $oItem; - }" -MTShopBreadcrumbCore,@var $oItem TShopBreadcrumbItemCategory,"public function _GetCacheParameters() - { - $aParameters = parent::_GetCacheParameters(); - - $oShop = TdbShop::GetInstance(); - $oActiveCategory = $oShop->GetActiveCategory(); - $oActiveItem = $oShop->GetActiveItem(); - if (!is_null($oActiveCategory)) { - $aParameters['iactivecategoryid'] = $oActiveCategory->id; - }" -MTShopBreadcrumbCore,@var $oItem TShopBreadcrumbItemArticle,"public function _GetCacheTableInfos() - { - $aTables = parent::_GetCacheTableInfos(); - - $oShop = TdbShop::GetInstance(); - $oActiveCategory = $oShop->GetActiveCategory(); - $oActiveItem = $oShop->GetActiveItem(); - if (!is_null($oActiveCategory)) { - $aTables[] = array('table' => 'shop_category', 'id' => ''); - }" -MTShopCentralHandlerCoreEndPoint,"* exposes methods that should be callable from all shop modules (via ajax or via get/post) - * IMPORTANT: do not extend this class. instead extend from MTShopCentralHandlerCore. -/*","public function Init() - { - parent::Init(); - $this->aUserData = $this->global->GetUserData(self::URL_DATA); - if (!is_array($this->aUserData)) { - $this->aUserData = array(); - }" -MTShopCentralHandlerCoreEndPoint,* @var string|null,"public function _AllowCache() - { - return true; - }" -MTShopCentralHandlerCoreEndPoint,* @var array,"public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/shopBasket')); - - return $aIncludes; - }" -MTShopInfoCore,"* module displays the contents of shop_system_info for one or more shop info items. -/*","public function Execute() - { - parent::Execute(); - - $this->data['oConf'] = $this->GetModuleConfig(); - $this->data['oInfos'] = $this->data['oConf']->GetFieldShopSystemInfoList('name'); - - return $this->data; - }" -MTShopInfoCore,"* the config data for the module instance. - * - * @var TdbShopSystemInfoModuleConfig","public function _AllowCache() - { - return true; - }" -MTShopInfoCore,"* return config record for modul instance. - * - * @return TdbShopSystemInfoModuleConfig|null","public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - $parameters['instanceID'] = $this->instanceID; - - return $parameters; - }" -MTShopInfoCore,"* prevent caching if there are messages. - * - * @return bool","public function _GetCacheTableInfos() - { - $aClearCacheInfo = parent::_GetCacheTableInfos(); - $oConf = $this->GetModuleConfig(); - if (!is_null($oConf)) { - $aClearCacheInfo[] = array('table' => $oConf->table, 'id' => $oConf->id); - $aIDList = $oConf->GetMLTIdList('shop_system_info'); - foreach ($aIDList as $infoPageId) { - $aClearCacheInfo[] = array('table' => 'shop_system_info', 'id' => $infoPageId); - }" -MTShopManufacturerArticleCatalogCore,* module is used to show the products for one manufacturer.,"public function Init() - { - parent::Init(); - - if ($this->global->UserDataExists(self::URL_MANUFACTURER_ID)) { - $this->iActiveManufacturerId = $this->global->GetUserData(self::URL_MANUFACTURER_ID); - }" -MTShopManufacturerArticleCatalogCore,* @var string|null,"public function Execute() - { - parent::Execute(); - $this->LoadManufacturer(); - $this->data['oManufacturer'] = $this->oActiveManufacturer; - - if (is_null($this->oActiveManufacturer)) { - $this->ManufacturerNotFoundHook(); - }" -MTShopManufacturerArticleCatalogCore,"* current active manufacturer. - * - * @var TdbShopManufacturer|null","public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - $parameters['iActiveManufacturerId'] = $this->iActiveManufacturerId; - - return $parameters; - }" -MTShopManufacturerArticleCatalogCore,"* load manufacturer and related data. - * - * @return void","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - if (!is_array($aIncludes)) { - $aIncludes = array(); - }" -MTShopManufacturerCore,"* id of manufacturer. - * - * @var string|null","public function Init() - { - parent::Init(); - $oGlobal = TGlobal::instance(); - $this->iActiveItemId = $oGlobal->GetUserData(self::URL_ITEM_ID_NAME); - if (empty($this->iActiveItemId)) { - $this->iActiveItemId = null; - }" -MTShopManufacturerCore,@var $oConfig TdbShopManufacturerModuleConf,"public function Execute() - { - parent::Execute(); - - $this->data['oManufacturerList'] = TdbShopManufacturerList::GetList(); - - $oConfig = TdbShopManufacturerModuleConf::GetNewInstance(); - /** @var $oConfig TdbShopManufacturerModuleConf */ - if (!$oConfig->LoadFromField('cms_tpl_module_instance_id', $this->instanceID)) { - $oConfig = null; - }" -MTShopManufacturerCore,* @return void,"public function GenerateModuleNavigation() - { - $aItems = array(); - $oManufacturerList = TdbShopManufacturerList::GetList(); - $oManufacturerList->GoToStart(); - $iActiveItem = 0; - $iNumItems = $oManufacturerList->Length(); - //firstNode, lastNode, active - while ($oManufacturer = $oManufacturerList->Next()) { - ++$iActiveItem; - $aClass = array(); - if (1 == $iActiveItem) { - $aClass[] = 'firstNode'; - }" -MTShopManufacturerCore,@var $oItem TdbShopManufacturer,"public function _AllowCache() - { - return true; - }" -MTShopManufacturerCore,"* if this function returns true, then the result of the execute function will be cached. - * - * @return bool","public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - $parameters['iActiveItemId'] = $this->iActiveItemId; - - return $parameters; - }" -MTShopManufacturerCore,"* return an assoc array of parameters that describe the state of the module. - * - * @return array","public function _GetCacheTableInfos() - { - $aCacheParams = parent::_GetCacheTableInfos(); - if (!is_array($aCacheParams)) { - $aCacheParams = array(); - }" -could,"* the order wizard coordinates the different steps a user needs to complete to execute an order. - * Note: The class could have extended from MTWizardCore, however the shop ordering process - * was deemed so imported, that a new class was conceived to prevent changes in MTWizardCore from - * leaking into the process.","public function Init() - { - parent::Init(); - - // load current step - $sStepName = $this->global->GetUserData(self::URL_PARAM_STEP_SYSTEM_NAME); - - if (TdbShopOrderStep::OrderProcessHasBeenMarkedAsCompleted() && 'thankyou' != $sStepName) { - // the order has been successfully executed... we redirect to the thank you page - // this only happens, if the user multi-klicks the send order button. - TTools::WriteLogEntry(""User multi-clicked on order confirm button. auto redirecting from step [{$sStepName}" -could,* @var TdbShopOrderStep,"public function Execute() - { - parent::Execute(); - $this->data['oActiveOrderStep'] = $this->oActiveOrderStep; - - $this->data['oSteps'] = TdbShopOrderStepList::GetNavigationStepList($this->oActiveOrderStep); - $this->data['sBasketRequestURL'] = self::GetCallingURL(); - - return $this->data; - }" -could,"* return the url to the page that requested the order step. - * - * @return string","public function ExecuteStep($sStepMethod = null) - { - if (is_null($this->oActiveOrderStep)) { - return false; - }" -could,"* save the url in the session so we can use it later to return to the calling page. - * - * @param string $sURL - * - * @return void","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - if (!is_array($aIncludes)) { - $aIncludes = array(); - }" -could,"* run a method on the step. default is ExecuteStep, but can be overwritten - * by passing the parameter $sStepMethod (if null is passed, the method will try to fetch - * the value from get/post from self::URL_PARAM_STEP_METHOD = xx. - * - * @param string|null $sStepMethod - method to execute. defaults to ExecuteStep - * - * @return false|null","public function GetHtmlFooterIncludes() - { - $aIncludes = parent::GetHtmlFooterIncludes(); - if (!is_array($aIncludes)) { - $aIncludes = array(); - }" -could,"* define any head includes the step needs. - * - * @return string[]","public function _AllowCache() - { - return false; - }" -MTShopPageMetaCore,@var $oItem TShopBreadcrumbItemArticle,"public function _GetTitle() - { - // alter the path if we have an active category or an active item - $sTitle = ''; - - //default SEO pattern of the page - $sTitle = $this->GetSeoPatternString(); - - if (strlen($sTitle) < 1) { - $oShop = TdbShop::GetInstance(); - $oActiveCategory = $oShop->GetActiveCategory(); - $oActiveItem = $oShop->GetActiveItem(); - - if (is_null($oActiveCategory) && is_null($oActiveItem)) { - $sTitle = parent::_GetTitle(); - }" -MTShopPageMetaCore,@var $oItem TShopBreadcrumbItemCategory,"public function _GetCacheParameters() - { - $aParameters = parent::_GetCacheParameters(); - - $oShop = TdbShop::GetInstance(); - $oActiveCategory = $oShop->GetActiveCategory(); - $oActiveItem = $oShop->GetActiveItem(); - - if (!is_null($oActiveCategory)) { - $aParameters['activecategoryid'] = $oActiveCategory->id; - }" -MTShopPageMetaCore,@var $oItem TShopBreadcrumbItemCategory,"public function _GetCacheTableInfos() - { - $tableInfo = parent::_GetCacheTableInfos(); - - $iarticle = ''; - $oShop = TdbShop::GetInstance(); - $oActiveItem = $oShop->GetActiveItem(); - if (!is_null($oActiveItem)) { - $iarticle = $oActiveItem->id; - }" -MTShopSearchFormCore,"* module used to render search forms. -/*","public function Execute() - { - parent::Execute(); - - try { - $this->data['sSearchURL'] = $this->getSystemPageService()->getLinkToSystemPageRelative('search'); - $this->data['q'] = $this->global->GetUserData('q'); - $this->data['quicksearchUrl'] = $this->getRouter()->generateWithPrefixes('chameleon_system_shop.search_suggest'); - }" -MTShopSearchFormCore,* {@inheritdoc},"public function _AllowCache() - { - return false === $this->global->UserDataExists('q'); - }" -MTShopSearchFormCore,"* prevent caching if there are messages. - * - * @return bool","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/MTShopSearchForm')); - - return $aIncludes; - }" -MTShopSearchTagsCore,"* module shows a tag cloud. -/*","public function Execute() - { - parent::Execute(); - - $this->data['oCloud'] = $this->GetSearchKeywordCloud(); - - return $this->data; - }" -MTShopViewMyOrderDetails,* @var string,"public function Init() - { - parent::Init(); - - $this->orderIdRequested = $this->getInputFilterUtil()->getFilteredInput('id', null); - }" -MTShopViewMyOrderDetails,* @return IPkgShopViewMyOrderDetails,"public function myOrderDetailHandlerFactory() - { - return new TPkgShopViewMyOrderDetails($this->getDbAdapter(), $this->getSessionAdapter()); - }" -MTShopViewMyOrderDetails,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - - $oRequirements->NeedsSourceObject( - 'viewOrderDetailHandler', - 'IPkgShopViewMyOrderDetails', - $this->myOrderDetailHandlerFactory() - ); - $oRequirements->NeedsSourceObject('orderIdRequested', 'string', $this->getInputFilterUtil()->getFilteredInput('id', null), true); - - $oRequirements->NeedsSourceObject('extranetUserId', 'string', TdbDataExtranetUser::GetInstance()->id, true); - }" -MTShopViewMyOrderDetails,@var $viewOrderDetailHandler IPkgShopViewMyOrderDetails,"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - /** @var $viewOrderDetailHandler IPkgShopViewMyOrderDetails */ - $viewOrderDetailHandler = $oVisitor->GetSourceObject('viewOrderDetailHandler'); - $orderIdRequested = $oVisitor->GetSourceObject('orderIdRequested'); - $extranetUserId = $oVisitor->GetSourceObject('extranetUserId'); - - $order = $this->getDbAdapter()->getOrder($orderIdRequested); - - $viewData = array( - 'error' => false, - 'errorCode' => null, - 'notMyOrderError' => false, - 'orderNotFoundError' => false, - 'order' => $order, - ); - - if (null === $order) { - $viewData['error'] = true; - $viewData['errorCode'] = 'orderNotFoundError'; - }" -MTShopViewMyOrderDetailsOrderObjectAsStringMapper,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('order', 'TdbShopOrder', null, true); - $oRequirements->NeedsSourceObject('view', 'string', 'print'); - }" -MTShopViewMyOrderDetailsOrderObjectAsStringMapper,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - /** @var $order TdbShopOrder */ - $order = $oVisitor->GetSourceObject('order'); - if (null === $order) { - return; - }" -TPkgShopViewMyOrderDetails,* @var IPkgShopViewMyOrderDetailsDbAdapter,"public function __construct( - IPkgShopViewMyOrderDetailsDbAdapter $dbAdapter, - IPkgShopViewMyOrderDetailsSessionAdapter $sessionAdapter - ) { - $this->dbAdapter = $dbAdapter; - $this->sessionAdapter = $sessionAdapter; - }" -TPkgShopViewMyOrderDetails,* @var IPkgShopViewMyOrderDetailsSessionAdapter,"public function addOrderIdToMyList($orderId, $userId = null) - { - if (null === $userId) { - $this->sessionAdapter->addOrderId($orderId); - }" -TPkgShopViewMyOrderDetailsDbAdapter,* @var Doctrine\DBAL\Connection,"public function __construct(\Doctrine\DBAL\Connection $dbConnection) - { - $this->dbConnection = $dbConnection; - }" -TPkgShopViewMyOrderDetailsDbAdapter,* {@inheritdoc},"public function hasOrder($userId, $orderId) - { - $query = 'select COUNT(id) AS matches FROM shop_order WHERE id = :orderId AND data_extranet_user_id = :userId'; - - $row = $this->dbConnection->fetchNumeric($query, array('orderId' => $orderId, 'userId' => $userId)); - - return intval($row[0]) >= 1; - }" -TPkgShopViewMyOrderDetailsDbAdapter,* {@inheritdoc},"public function getOrder($orderId) - { - $order = TdbShopOrder::GetNewInstance(); - if (false === $order->Load($orderId)) { - return null; - }" -TPkgShopViewMyOrderDetailsSessionAdapter,* @var Symfony\Component\HttpFoundation\Session\SessionInterface,"public function __construct(\Symfony\Component\HttpFoundation\Session\SessionInterface $session) - { - $this->session = $session; - }" -TPkgShopViewMyOrderDetailsSessionAdapter,"* @param string $orderId - * - * @return bool","public function addOrderId($orderId) - { - $orderIdList = $this->session->get(self::SESSIONNAME, array()); - $orderIdList[] = $orderId; - $this->session->set(self::SESSIONNAME, $orderIdList); - }" -,"* @param string $orderId - * @param string|null $userId - * @return void","public function __construct(IPkgShopViewMyOrderDetailsDbAdapter $dbAdapter, IPkgShopViewMyOrderDetailsSessionAdapter $sessionAdapter); - - /** - * @param string $orderId - * @param string|null $userId - * @return void - */ - public function addOrderIdToMyList($orderId, $userId = null); - - /** - * @param string $orderId - * @param string|null $userId - * @return bool - */ - public function orderIdBelongsToUser($orderId, $userId = null); -}" -,"* @param string $userId - * @param string $orderId - * - * @return bool","public function hasOrder($userId, $orderId); - - /** - * @param string $orderId - * - * @return TdbShopOrder|null - */ - public function getOrder($orderId); -}" -,"* @param string $orderId - * @return void","public function addOrderId($orderId); - - /** - * @param string $orderId - * @return bool - */ - public function hasOrder($orderId); -}" -OrderPaymentInfo,* @var string,"public function __construct($orderId, $paymentHandlerId, $portalId) - { - $this->orderId = $orderId; - $this->paymentHandlerId = $paymentHandlerId; - $this->portalId = $portalId; - }" -OrderPaymentInfo,* @var string,"public function getOrderId() - { - return $this->orderId; - }" -OrderPaymentInfo,* @var string,"public function getPaymentHandlerId() - { - return $this->paymentHandlerId; - }" -OrderPaymentInfo,"* @param string $orderId - * @param string $paymentHandlerId - * @param string $portalId","public function getPortalId() - { - return $this->portalId; - }" -ShopPaymentConfigLoader,"* ShopPaymentConfigLoader loads the configuration for payment handlers. - * See the payment section in this bundle's documentation on how the configuration loading process works.","public function __construct( - ShopPaymentConfigLoaderDataAccessInterface $shopPaymentConfigLoaderDataAccess, - $defaultEnvironment - ) { - $this->shopPaymentConfigLoaderDataAccess = $shopPaymentConfigLoaderDataAccess; - $this->defaultEnvironment = $defaultEnvironment; - $this->configProviderList = array(); - }" -ShopPaymentConfigLoader,* @var ShopPaymentConfigLoaderDataAccessInterface,"public function loadFromOrderId($orderId) - { - try { - $orderPaymentInfo = $this->shopPaymentConfigLoaderDataAccess->getDataFromOrderId( - $orderId - ); - - return $this->loadFromPaymentHandlerId( - $orderPaymentInfo->getPaymentHandlerId(), - $orderPaymentInfo->getPortalId() - ); - }" -ShopPaymentConfigLoader,* @var string,"public function loadFromPaymentHandlerId($paymentHandlerId, $portalId) - { - try { - $paymentHandlerGroupId = $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromPaymentHandlerId( - $paymentHandlerId - ); - - return $this->loadConfiguration($portalId, $paymentHandlerGroupId, $paymentHandlerId); - }" -ShopPaymentConfigLoader,* @var ShopPaymentConfigProviderInterface[],"public function loadFromPaymentHandlerGroupId($paymentHandlerGroupId, $portalId) - { - return $this->loadConfiguration($portalId, $paymentHandlerGroupId, null); - }" -ShopPaymentConfigLoader,"* @param ShopPaymentConfigLoaderDataAccessInterface $shopPaymentConfigLoaderDataAccess - * @param string $defaultEnvironment One of IPkgShopOrderPaymentConfig::ENVIRONMENT_*","public function loadFromPaymentHandlerGroupSystemName($systemName, $portalId) - { - try { - $paymentHandlerGroupId = $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromSystemName( - $systemName - ); - - return $this->loadConfiguration($portalId, $paymentHandlerGroupId, null); - }" -ShopPaymentConfigLoader,* {@inheritdoc},"public function addConfigProvider($alias, ShopPaymentConfigProviderInterface $shopPaymentConfigProvider) - { - $this->configProviderList[$alias] = $shopPaymentConfigProvider; - }" -ShopPaymentConfigLoaderDatabaseAccess,* @var Connection,"public function __construct(Connection $databaseConnection) - { - $this->databaseConnection = $databaseConnection; - }" -ShopPaymentConfigLoaderDatabaseAccess,* {@inheritdoc},"public function getDataFromOrderId($orderId) - { - $order = TdbShopOrder::GetNewInstance(); - if (!$order->Load($orderId)) { - throw new DataAccessException('Error while loading order with ID '.$orderId); - }" -ShopPaymentConfigLoaderDatabaseAccess,* {@inheritdoc},"public function getPaymentHandlerGroupIdFromPaymentHandlerId($paymentHandlerId) - { - $handler = TdbShopPaymentHandler::GetNewInstance(); - if (!$handler->Load($paymentHandlerId)) { - throw new DataAccessException('Error while loading payment handler with ID '.$paymentHandlerId); - }" -ShopPaymentConfigLoaderDatabaseAccess,* {@inheritdoc},"public function getPaymentHandlerGroupIdFromSystemName($systemName) - { - $handlerGroup = TdbShopPaymentHandlerGroup::GetNewInstance(); - if (!$handlerGroup->LoadFromField('system_name', $systemName)) { - throw new DataAccessException('Error while loading payment handler group ID for systemName '.$systemName); - }" -ShopPaymentConfigLoaderDatabaseAccess,* {@inheritdoc},"public function getPaymentHandlerGroupSystemNameFromId($paymentHandlerGroupId) - { - $handlerGroup = TdbShopPaymentHandlerGroup::GetNewInstance(); - if (!$handlerGroup->Load($paymentHandlerGroupId)) { - throw new DataAccessException( - 'Error while loading payment handler group systemName for ID '.$paymentHandlerGroupId - ); - }" -ShopPaymentConfigLoaderDatabaseAccess,* {@inheritdoc},"public function getEnvironment($paymentHandlerGroupId) - { - $paymentHandlerGroup = TdbShopPaymentHandlerGroup::GetNewInstance(); - if (!$paymentHandlerGroup->Load($paymentHandlerGroupId)) { - throw new DataAccessException( - 'Error while loading environment for payment handler group with ID '.$paymentHandlerGroupId - ); - }" -ShopPaymentConfigLoaderDatabaseAccess,* {@inheritdoc},"public function loadPaymentHandlerGroupConfig($shopPaymentHandlerGroupId) - { - $query = 'SELECT `shop_payment_handler_group_config`.`name`, `shop_payment_handler_group_config`.`value`, `shop_payment_handler_group_config`.`type`, `shop_payment_handler_group_config`.`cms_portal_id` - FROM `shop_payment_handler_group_config` - WHERE `shop_payment_handler_group_config`.`shop_payment_handler_group_id` = :shopPaymentHandlerGroupId'; - try { - $configDataRaw = $this->databaseConnection->fetchAllAssociative( - $query, - array('shopPaymentHandlerGroupId' => $shopPaymentHandlerGroupId) - ); - }" -ShopPaymentConfigLoaderDatabaseAccess,* {@inheritdoc},"public function loadPaymentHandlerConfig($shopPaymentHandlerId) - { - $query = 'SELECT `shop_payment_handler_parameter`.`systemname`, `shop_payment_handler_parameter`.`value`, `shop_payment_handler_parameter`.`type`, `shop_payment_handler_parameter`.`cms_portal_id` - FROM `shop_payment_handler_parameter` - WHERE `shop_payment_handler_parameter`.`shop_payment_handler_id` = :shopPaymentHandlerId'; - try { - $configDataRaw = $this->databaseConnection->fetchAllAssociative( - $query, - array('shopPaymentHandlerId' => $shopPaymentHandlerId) - ); - }" -ShopPaymentConfigLoaderRequestLevelCacheDecorator,* @var ShopPaymentConfigLoaderInterface,"public function __construct(ShopPaymentConfigLoaderInterface $subject) - { - $this->subject = $subject; - }" -ShopPaymentConfigLoaderRequestLevelCacheDecorator,* @var array,"public function loadFromOrderId($orderId) - { - // Do not cache, because we can't generate an efficient cache key here. - return $this->subject->loadFromOrderId($orderId); - }" -ShopPaymentConfigLoaderRequestLevelCacheDecorator,* @param ShopPaymentConfigLoaderInterface $subject,"public function loadFromPaymentHandlerId($paymentHandlerId, $portalId) - { - $cacheKey = ""loadFromPaymentHandlerId-$paymentHandlerId-$portalId""; - if (false === isset($this->cache[$cacheKey])) { - $this->cache[$cacheKey] = $this->subject->loadFromPaymentHandlerId($paymentHandlerId, $portalId); - }" -ShopPaymentConfigLoaderRequestLevelCacheDecorator,* {@inheritdoc},"public function loadFromPaymentHandlerGroupId($paymentGroupId, $portalId) - { - $cacheKey = ""loadFromPaymentHandlerGroupId-$paymentGroupId-$portalId""; - if (false === isset($this->cache[$cacheKey])) { - $this->cache[$cacheKey] = $this->subject->loadFromPaymentHandlerGroupId($paymentGroupId, $portalId); - }" -ShopPaymentConfigLoaderRequestLevelCacheDecorator,* {@inheritdoc},"public function loadFromPaymentHandlerGroupSystemName($systemName, $portalId) - { - $cacheKey = ""loadFromPaymentHandlerGroupSystemName-$systemName-$portalId""; - if (false === isset($this->cache[$cacheKey])) { - $this->cache[$cacheKey] = $this->subject->loadFromPaymentHandlerGroupSystemName($systemName, $portalId); - }" -ShopPaymentConfigRawValue,"* ShopPaymentConfigRawValue describes a configuration parameter that has been read from a data source, but is - * not computed yet.","public function __construct($name, $value, $environment, $portalId, $source) - { - $this->name = $name; - $this->value = $value; - $this->environment = $environment; - $this->portalId = $portalId; - $this->source = $source; - }" -ShopPaymentConfigRawValue,@var string,"public function getName() - { - return $this->name; - }" -ShopPaymentConfigRawValue,@var string,"public function getValue() - { - return $this->value; - }" -ShopPaymentConfigRawValue,@var string,"public function getEnvironment() - { - return $this->environment; - }" -ShopPaymentConfigRawValue,@var string,"public function getPortalId() - { - return $this->portalId; - }" -ShopPaymentConfigRawValue,"* @var int - * @psalm-var self::SOURCE_*","public function getSource() - { - return $this->source; - }" -,"* ShopPaymentConfigLoaderDataAccessInterface is only meant to be used by an implementation - * of ShopPaymentConfigLoaderInterface. It separates the data access from business logic in the config loader.","public function getDataFromOrderId($orderId); - - /** - * Returns a paymentHandlerGroupId of the payment handler group that is assigned to the payment handler with the - * given ID. - * - * @param string $paymentHandlerId - * - * @return string - * - * @throws DataAccessException - */ - public function getPaymentHandlerGroupIdFromPaymentHandlerId($paymentHandlerId); - - /** - * Returns a paymentHandlerGroupId of the payment handler group with the given systemName. - * - * @param string $systemName - * - * @return string - * - * @throws DataAccessException - */ - public function getPaymentHandlerGroupIdFromSystemName($systemName); - - /** - * Returns a payment handler group with the given paymentHandlerGroupId. - * - * @param string $paymentHandlerGroupId - * - * @return string - * - * @throws DataAccessException - */ - public function getPaymentHandlerGroupSystemNameFromId($paymentHandlerGroupId); - - /** - * Returns the active environment for the payment handler group with the given paymentHandlerGroupId. - * - * @param string $paymentHandlerGroupId - * - * @return string One of the environment constants in IPkgShopOrderPaymentConfig - * - * @throws DataAccessException - */ - public function getEnvironment($paymentHandlerGroupId); - - /** - * Returns the raw configuration data for the payment handler group with the given paymentHandlerGroupId. - * - * @param string $paymentHandlerGroupId - * - * @return ShopPaymentConfigRawValue[] - * - * @throws DataAccessException - */ - public function loadPaymentHandlerGroupConfig($paymentHandlerGroupId); - - /** - * Returns the raw configuration data for the payment handler with the given paymentHandlerId. - * - * @param string $paymentHandlerId - * - * @return ShopPaymentConfigRawValue[] - * - * @throws DataAccessException - */ - public function loadPaymentHandlerConfig($paymentHandlerId); -}" -,"* ShopPaymentConfigLoaderInterface defines an interface that allows loading configuration data for payment handlers and - * payment groups.","public function loadFromOrderId($orderId); - - /** - * Loads a payment configuration for a payment handler in a portal. - * - * @param string $paymentHandlerId - * @param string $portalId - * - * @return \IPkgShopOrderPaymentConfig - * - * @throws ConfigurationException - */ - public function loadFromPaymentHandlerId($paymentHandlerId, $portalId); - - /** - * Loads a payment configuration for a payment group [not a payment handler!] within a portal. - * - * @param string $paymentGroupId - * @param string $portalId - * - * @return \IPkgShopOrderPaymentConfig - * - * @throws ConfigurationException - */ - public function loadFromPaymentHandlerGroupId($paymentGroupId, $portalId); - - /** - * Loads a payment configuration for a payment group within a portal based on the payment groups systemName. - * - * @param string $systemName - * @param string $portalId - * - * @return \IPkgShopOrderPaymentConfig - * - * @throws ConfigurationException - */ - public function loadFromPaymentHandlerGroupSystemName($systemName, $portalId); -}" -,"* Gets custom configuration from an arbitrary source (e.g. container configuration or config files). - * This configuration will override any configuration values of the payment handler group, and will - * itself be overridden by the payment handler configuration. - * - * @return ShopPaymentConfigRawValue[]","public function getAdditionalConfiguration(); -}" -ShopPaymentHandlerDataAccessRequestLevelCacheDecorator,* @var ShopPaymentHandlerDataAccessInterface,"public function __construct(ShopPaymentHandlerDataAccessInterface $subject) - { - $this->subject = $subject; - }" -ShopPaymentHandlerDataAccessRequestLevelCacheDecorator,* @var array,"public function getBarePaymentHandler($paymentHandlerId, $languageId = null) - { - $cacheKey = $paymentHandlerId; - if (false === isset($this->cache[$cacheKey])) { - $paymentHandler = $this->subject->getBarePaymentHandler($paymentHandlerId, $languageId); - if (null === $paymentHandler) { - return null; - }" -ShopPaymentHandlerDatabaseAccess,* {@inheritdoc},"public function getBarePaymentHandler($paymentHandlerId, $languageId = null) - { - $paymentHandler = TdbShopPaymentHandler::GetInstance($paymentHandlerId); - if (null === $paymentHandler || false === $paymentHandler->sqlData) { - return null; - }" -ShopPaymentHandlerFactory,* @var ShopPaymentConfigLoaderInterface,"public function __construct(ShopPaymentConfigLoaderInterface $shopPaymentConfigLoader, ShopPaymentHandlerDataAccessInterface $shopPaymentHandlerDataAccess) - { - $this->shopPaymentConfigLoader = $shopPaymentConfigLoader; - $this->shopPaymentHandlerDataAccess = $shopPaymentHandlerDataAccess; - }" -ShopPaymentHandlerFactory,* @var ShopPaymentHandlerDataAccessInterface,"public function createPaymentHandler($paymentHandlerId, $portalId, array $userParameterList = array()) - { - $paymentHandler = $this->shopPaymentHandlerDataAccess->getBarePaymentHandler($paymentHandlerId); - $configData = $this->shopPaymentConfigLoader->loadFromPaymentHandlerId($paymentHandlerId, $portalId); - $paymentHandler->setConfigData($configData); - $paymentHandler->SetPaymentUserData($userParameterList); - - return $paymentHandler; - }" -,"* Returns a payment handler instance that is NOT completely initialized. The instance is only loaded from the - * database without configuration or user data being applied. - * - * @param string $paymentHandlerId - * @param string|null $languageId - * - * @return TdbShopPaymentHandler|null the payment handler or null if no handler with the given ID could be loaded","public function getBarePaymentHandler($paymentHandlerId, $languageId = null); -}" -,* ShopPaymentHandlerFactoryInterface defines an interface for creating fully configured payment handlers.,"public function createPaymentHandler($paymentHandlerId, $portalId, array $userParameterList = array()); -}" -TShopDataExtranetCore,"* returns link to current page with logout method as parameter for given spotname of extranet module if not on ""thank you"" page of order process - * otherwise it would return link to home page with logout method as parameter for given spotname. - * - * @param string $sSpotName - * - * @return string","public function GetLinkLogout($sSpotName) - { - $oGlobal = TGlobal::instance(); - // if we are on the last page of checkout process we can't use the active page url for logout - // so we redirect to the home url with logout method as parameter - if ($oGlobal->UserDataExists(MTShopOrderWizardCore::URL_PARAM_STEP_SYSTEM_NAME) && 'thankyou' == $oGlobal->GetUserData(MTShopOrderWizardCore::URL_PARAM_STEP_SYSTEM_NAME)) { - return self::getPageService()->getLinkToPortalHomePageAbsolute().'?'.TTools::GetArrayAsURL(array('module_fnc['.$sSpotName.']' => 'Logout')); - }" -TShopDataExtranetUser,"* shop specific extranet user extensions. -/*","public function __sleep() - { - $aData = parent::__sleep(); - $aData[] = 'aArticleViewHistory'; - $aData[] = 'aNoticeList'; - - return $aData; - }" -TShopDataExtranetUser,"* the article ids last viewed by the user (ie. on the detail page) will be stored here - * Note: the although the list may grow longer (the complete history will be saved for logged in users) - * we will only keep the first 100 in this list. - * - * @var array","public function GetCustomerNumber() - { - $sCustNr = parent::GetCustomerNumber(); - if (empty($sCustNr)) { - $oShop = TdbShop::GetInstance(); - $sCustNr = $oShop->GetNextFreeCustomerNumber(); - $aData = $this->sqlData; - $aData['customer_number'] = $sCustNr; - $this->LoadFromRow($aData); - }" -TShopDataExtranetUser,"* the notice list (merkzettel) of the user. Note: this list is stored in session and for logged in users - * in the database. - * - * @var array","public function GetUserAlias() - { - $sAlias = trim($this->fieldAliasName); - if (empty($sAlias)) { - $sAlias = $this->fieldFirstname.' '.mb_substr($this->fieldLastname, 0, 1).'.'; - }" -TShopDataExtranetUser,* we use the post insert hook to set the customer number.,"public function GetReviewsPublished() - { - return TdbShopArticleReviewList::GetPublishedReviewsForUser($this->id, $this->iLanguageId); - }" -TShopDataExtranetUser,* @return void,"public function AddArticleIdToViewHistory($iArticleId) - { - if (is_null($this->aArticleViewHistory)) { - $this->GetArticleViewHistory(); - }" -TShopDataExtranetUser,"* returns the users customer number, if set. - * - * @return int","public function GetArticleViewHistory() - { - if (is_null($this->aArticleViewHistory)) { - $this->aArticleViewHistory = array(); - $iMaxQueueLength = 100; - $shop = $this->getShopService()->getActiveShop(); - if ($shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount < $iMaxQueueLength && $shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount > 0) { - $iMaxQueueLength = $shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount; - }" -TShopDataExtranetUser,* save view history to user data...,"public function GetNoticeListArticles() - { - if (is_null($this->aNoticeList)) { - $this->aNoticeList = array(); - $iMaxQueueLength = 1000; - - if ($this->IsLoggedIn()) { - // fetch from user - $iNumRecsAdded = 0; - $oNoticeList = $this->GetFieldShopUserNoticeListList(); - while (($oNoticeListItem = $oNoticeList->Next()) && $iNumRecsAdded <= $iMaxQueueLength) { - if (!empty($oNoticeListItem->fieldShopArticleId)) { - $this->aNoticeList[$oNoticeListItem->fieldShopArticleId] = $oNoticeListItem->sqlData; - }" -TShopDataExtranetUser,"* takes the article view history from session and merges it with the data - * in the database. this is done when the user logs in to make the history permanent. - * - * @return void","public function AddArticleIdToNoticeList($iArticleId, $iAmount = 1) - { - $dNewAmountOnList = 0; - - if (is_null($this->aNoticeList)) { - $this->GetNoticeListArticles(); - }" -TShopDataExtranetUser,"* takes the notice list from session and merges it with the data - * in the database. this is done when the user logs in to make the notice list permanent. - * - * @return void","public function RemoveArticleFromNoticeList($sArticleId) - { - $this->GetNoticeListArticles(); - if (array_key_exists($sArticleId, $this->aNoticeList)) { - unset($this->aNoticeList[$sArticleId]); - if ($this->IsLoggedIn()) { - $noticeListItemObject = TdbShopUserNoticeList::GetNewInstance(); - if (true === $noticeListItemObject->LoadFromFields( - array( - 'data_extranet_user_id' => $this->id, - 'shop_article_id' => $sArticleId, - ) - )) { - $noticeListItemObject->Delete(); - }" -TShopDataExtranetUser,@var $oItem TdbShopUserNoticeList,"public function ValidateData($sFormDataName = null) - { - if (is_null($sFormDataName)) { - $sFormDataName = TdbDataExtranetUser::MSG_FORM_FIELD; - }" -TShopDataExtranetUser,"* return alias for the user. - * - * @return string","public function GetTotalOrderValue($sStartDate = null, $sEndDate = null) - { - $query = ""SELECT SUM(value_total) AS ordervalue - FROM `shop_order` - WHERE `data_extranet_user_id` = '"".MySqlLegacySupport::getInstance()->real_escape_string($this->id).""' - AND (`shop_order`.`id` IS NULL OR `shop_order`.`canceled` = '0') - ""; - if (!is_null($sStartDate)) { - $query .= "" AND `datecreated` >= '"".MySqlLegacySupport::getInstance()->real_escape_string($sStartDate).""' ""; - }" -TShopDataExtranetUser,"* get all reviews that have been published. - * - * @return TdbShopArticleReviewList","public function Logout() - { - $oBasket = TShopBasket::GetInstance(); - if (is_array($oBasket->aCompletedOrderStepList)) { - reset($oBasket->aCompletedOrderStepList); - foreach ($oBasket->aCompletedOrderStepList as $sStepName => $bValue) { - $oBasket->aCompletedOrderStepList[$sStepName] = false; - }" -TShopDataExtranetUser,"* add an article to the view history. - * - * @param int $iArticleId - * - * @return void","public function UpdateShippingAddress($aAddressData) - { - $oOldAddress = clone $this->GetShippingAddress(); - $oOldBillingAddress = clone $this->GetBillingAddress(); - $bUpdated = parent::UpdateShippingAddress($aAddressData); - - $oNewAddress = $this->GetShippingAddress(); - if (false === $oNewAddress->hasSameDataInSqlData($oOldAddress)) { - $this->hookChangedShippingAddress($oOldAddress, $oNewAddress); - }" -TShopDataExtranetUser,"* returns the ids of up to the last 100 articles viewed. - * - * @return array","public function SetAddressAsShippingAddress($sAddressId) - { - $oOldShippingAddress = clone $this->GetShippingAddress(); - $oOldBillingAddress = clone $this->GetBillingAddress(); - - $oNewShippingAddress = parent::SetAddressAsShippingAddress($sAddressId); - - if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) { - $this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress); - }" -TShopDataExtranetUser,"* returns the of the articles on the notice list. note: we limit the notice list to 1000 items. - * - * @return array","public function ShipToAddressOtherThanBillingAddress() - { - $oOldAddress = clone $this->GetShippingAddress(); - $oOldBillingAddress = clone $this->GetBillingAddress(); - - $bUpdated = parent::ShipToAddressOtherThanBillingAddress(); - $oNewAddress = $this->GetShippingAddress(); - if (false === $oNewAddress->hasSameDataInSqlData($oOldAddress)) { - $this->hookChangedShippingAddress($oOldAddress, $oNewAddress); - }" -TShopDataExtranetUser,"* add an article to the notice list. - * - * @param int $iArticleId - * @param float $iAmount - * - * @return float|false - new amount on list","public function ShipToBillingAddress($bSetShippingToBillingAddress = false) - { - $oOldAddress = clone $this->GetShippingAddress(); - $oOldBillingAddress = clone $this->GetBillingAddress(); - $bUpdated = parent::ShipToBillingAddress($bSetShippingToBillingAddress); - - $oNewAddress = $this->GetShippingAddress(); - if (false === $oNewAddress->hasSameDataInSqlData($oOldAddress)) { - $this->hookChangedShippingAddress($oOldAddress, $oNewAddress); - }" -TShopDataExtranetUser,@var $oNoticeListItem TdbShopUserNoticeList,"public function SetAddressAsBillingAddress($sAddressId) - { - $oOldShippingAddress = clone $this->GetShippingAddress(); - $oOldBillingAddress = clone $this->GetBillingAddress(); - $oNewBillingAddress = parent::SetAddressAsBillingAddress($sAddressId); - - $oNewShippingAddress = $this->GetShippingAddress(); - if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) { - $this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress); - }" -TShopDataExtranetUser,"* save user notice list to cookie. - * - * @return void","public function UpdateBillingAddress($aAddressData) - { - $oOldShippingAddress = clone $this->GetShippingAddress(); - $oOldBillingAddress = clone $this->GetBillingAddress(); - - $bUpdated = parent::UpdateBillingAddress($aAddressData); - $oNewShippingAddress = $this->GetShippingAddress(); - if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) { - $this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress); - }" -MTShopMyAccountCore,* @return void,"public function Execute() - { - parent::Execute(); - - $activePage = $this->getActivePageService()->getActivePage(); - $aSignup = array('module_fnc' => array($this->sModuleSpotName => 'NewsletterSubscribe')); - $this->data['sNewsSignupLink'] = $activePage->GetRealURLPlain($aSignup); - - $aSignout = array('module_fnc' => array($this->sModuleSpotName => 'NewsletterUnsubscribe')); - $this->data['sNewsSignoutLink'] = $activePage->GetRealURLPlain($aSignout); - - return $this->data; - }" -MTShopMyAccountCore,"* There are different ways of opting in into the newsletter table: - * - Subscribe on Website - * - Subscribe on MyAccount page - * - Subscribe while ordering - * This information is now put into the optincode field.","public function NewsletterSubscribe() - { - // subscribe shop user to newsletter - $oUser = TdbDataExtranetUser::GetInstance(); - - $oNewsletter = TdbPkgNewsletterUser::GetInstanceForActiveUser(); - if (is_null($oNewsletter)) { - $oNewsletter = TdbPkgNewsletterUser::GetNewInstance(); - $aData = array(); - $sNow = date('Y-m-d H:i:s'); - $aData['email'] = $oUser->GetUserEMail(); - $aData['data_extranet_salutation_id'] = $oUser->fieldDataExtranetSalutationId; - $aData['lastname'] = $oUser->fieldLastname; - $aData['firstname'] = $oUser->fieldFirstname; - $aData['signup_date'] = $sNow; - /** - * There are different ways of opting in into the newsletter table: - * - Subscribe on Website - * - Subscribe on MyAccount page - * - Subscribe while ordering - * This information is now put into the optincode field. - */ - $aData['optincode'] = 'MyAccount'; - $aData['data_extranet_user_id'] = $oUser->id; - $aData['cms_portal_id'] = $oUser->fieldCmsPortalId; - $oNewsletter->LoadFromRow($aData); - $oNewsletter->ConfirmSignup(); - $oNewsletter->Save(); - $oNewsletter->PostSignUpNewsletterUserOnly(); - TdbPkgNewsletterUser::GetInstanceForActiveUser(true); - - $oMsgManager = TCMSMessageManager::GetInstance(); - $oMsgManager->AddMessage(self::MSG_BASE_NAME.'-newsletter', 'NEWSLETTER-USER-SUBSCRIBED'); - }" -MTShopMyAccountCore,* @return void,"public function NewsletterUnsubscribe() - { - $oNewsletter = TdbPkgNewsletterUser::GetInstanceForActiveUser(); - if (!is_null($oNewsletter)) { - $oNewsletter->SignOut(); - TdbPkgNewsletterUser::GetInstanceForActiveUser(true); - $oMsgManager = TCMSMessageManager::GetInstance(); - $oMsgManager->AddMessage(self::MSG_BASE_NAME.'-newsletter', 'NEWSLETTER-USER-UNSUBSCRIBED'); - }" -MTShopMyAccountCore,* @return never,"public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgNewsletter')); - - return $aIncludes; - }" -MTShopMyAccountCore,* @return string[],"public function _AllowCache() - { - return false; - }" -TPkgRunFrontendAction_SendOrderEMail,"* @param array $aParameter - * - * @return TPkgRunFrontendActionStatus","public function runAction($aParameter) - { - $oStatus = new TPkgRunFrontendActionStatus(); - if (isset($aParameter['email']) && isset($aParameter['order_id']) && !empty($aParameter['email']) && !empty($aParameter['order_id'])) { - $oOrder = TdbShopOrder::GetNewInstance(); - if ($oOrder->Load($aParameter['order_id'])) { - $bSuccess = $oOrder->SendOrderNotification($aParameter['email']); - if ($bSuccess) { - $oStatus->sMessage = TGlobal::Translate('chameleon_system_shop.orders.msg_order_confirm_sent', array('%mail%' => $aParameter['email'])); - $oStatus->sMessageType = 'MESSAGE'; - }" -,"* Loads stock record from shop_article_stock table and returns stock value. - * If the record is missing the query will fail and the method returns false. - * - * @param string $shopArticleId - * - * @return int|false may return false if the query does not find a stock record","public function getAvailableStock($shopArticleId); - - /** - * @param string $shopArticleId - * @param int $stock - * - * @return void - */ - public function addStock($shopArticleId, $stock); - - /** - * @param string $shopArticleId - * @param int $stock - * - * @return void - */ - public function setStock($shopArticleId, $stock); - - /** - * @param string $parentArticleId - * - * @return void - */ - public function updateVariantParentStock($parentArticleId); -}" -ProductStatistics,@var int,"public function setDetailViews($detailViews) - { - $this->detailViews = $detailViews; - }" -ProductStatistics,@var int,"public function getDetailViews() - { - return (null !== $this->detailViews) ? $this->detailViews : 0; - }" -ProductStatistics,@var int,"public function setReviewAverage($reviewAverage) - { - $this->reviewAverage = $reviewAverage; - }" -ProductStatistics,@var int,"public function getReviewAverage() - { - return (null !== $this->reviewAverage) ? $this->reviewAverage : 0; - }" -ProductStatistics,"* @param int $detailViews - * - * @return void","public function setReviews($reviews) - { - $this->reviews = $reviews; - }" -ProductStatistics,* @return int,"public function getReviews() - { - return (null !== $this->reviews) ? $this->reviews : 0; - }" -ProductStatistics,"* @param int $reviewAverage - * - * @return void","public function setSales($sales) - { - $this->sales = $sales; - }" -ProductStatistics,* @return int,"public function getSales() - { - return (null !== $this->sales) ? $this->sales : 0; - }" -,* @return int,"public function getSales(); - - /** - * @return int - */ - public function getDetailViews(); - - /** - * @return int - */ - public function getReviews(); - - /** - * @return int - */ - public function getReviewAverage(); -}" -,"* @param string $articleId - * - * @return ProductStatisticsInterface","public function getStats($articleId); - - /** - * @param string $articleId - * @param int $type - * @param float $amount - * @psalm-param self::TYPE_* $type - * @return void - */ - public function add($articleId, $type, $amount); - - /** - * @param string $articleId - * @param int $type - * @param float $amount - * @psalm-param self::TYPE_* $type - * @return void - */ - public function set($articleId, $type, $amount); - - /** - * @param string $parentArticleId - * @return void - */ - public function updateAllBasedOnVariants($parentArticleId); -}" -ProductVariantNameGenerator,* {@inheritdoc},"public function generateName(\TdbShopArticle $product, $variantNameType = ProductVariantNameGeneratorInterface::VARIANT_NAME_TYPE_DEFAULT) - { - if (false === $product->IsVariant()) { - return null; - }" -ProductVariantNameGenerator,"* @param \TdbShopArticle $product - * @param string $variantNameType - * @param string $languageId - * - * @return string","public function generateNamesForAllLanguages(\TdbShopArticle $product, $variantNameType = ProductVariantNameGeneratorInterface::VARIANT_NAME_TYPE_DEFAULT) - { - if (false === $product->IsVariant()) { - return null; - }" -,"* Returns a variant name in the same language as the passed $product. - * - * @param \TdbShopArticle $product - * @param int $variantNameType - * - * @return string|null a variant name, or null if the product is not a variant","public function generateName(\TdbShopArticle $product, $variantNameType = self::VARIANT_NAME_TYPE_DEFAULT); - - /** - * Returns a list of variant names, one for every language that is registered for field-based translation in cms_config. - * - * @param \TdbShopArticle $product - * @param int $variantNameType - * - * @return array|null a list of variant names (key = language, value = variant name), or null if the product is not a variant - */ - public function generateNamesForAllLanguages(\TdbShopArticle $product, $variantNameType = self::VARIANT_NAME_TYPE_DEFAULT); -}" -PaymentMethodDataAccessRuntimeCacheDecorator,* @var PaymentMethodDataAccessInterface,"public function __construct(PaymentMethodDataAccessInterface $subject) - { - $this->subject = $subject; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* @var array,"public function getShippingCountryIds($paymentMethodId) - { - $key = sprintf('shippingCountryIds-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* @param PaymentMethodDataAccessInterface $subject,"public function getBillingCountryIds($paymentMethodId) - { - $key = sprintf('billingCountryIds-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedUserIds($paymentMethodId) - { - $key = sprintf('permittedUserIds-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedUserGroupIds($paymentMethodId) - { - $key = sprintf('permittedUserGroupIds-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedArticleIds($paymentMethodId) - { - $key = sprintf('articleIdRestrictions-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedCategoryIds($paymentMethodId) - { - $key = sprintf('categoryIdRestrictions-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedArticleGroupIds($paymentMethodId) - { - $key = sprintf('articleGroupIdRestrictions-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getInvalidArticleIds($paymentMethodId) - { - $key = sprintf('invalidArticleIds-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getInvalidCategoryIds($paymentMethodId) - { - $key = sprintf('invalidCategoryIds-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -PaymentMethodDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getInvalidArticleGroupIds($paymentMethodId) - { - $key = sprintf('invalidArticleGroupIds-%s', $paymentMethodId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ProductStatisticsServiceRuntimeCacheDecorator,* @var ProductStatisticsServiceInterface,"public function __construct(ProductStatisticsServiceInterface $subject) - { - $this->subject = $subject; - }" -ProductStatisticsServiceRuntimeCacheDecorator,* @var ProductStatisticsInterface[],"public function getStats($articleId) - { - if (isset($this->cacheStats[$articleId])) { - return $this->cacheStats[$articleId]; - }" -ProductStatisticsServiceRuntimeCacheDecorator,* @param ProductStatisticsServiceInterface $subject,"public function add($articleId, $type, $amount) - { - $this->subject->add($articleId, $type, $amount); - $this->resetStatsCache($articleId); - }" -ProductStatisticsServiceRuntimeCacheDecorator,* {@inheritdoc},"public function set($articleId, $type, $amount) - { - $this->subject->set($articleId, $type, $amount); - $this->resetStatsCache($articleId); - }" -ProductStatisticsServiceRuntimeCacheDecorator,* {@inheritdoc},"public function updateAllBasedOnVariants($parentArticleId) - { - $this->subject->updateAllBasedOnVariants($parentArticleId); - $this->cacheStats = array(); - }" -ShopCategoryDataAccessRuntimeCacheDecorator,* root categories do not have a parent id - so we force a key to use in the parentChildMapping.,"public function __construct(ShopCategoryDataAccessInterface $subject) - { - $this->subject = $subject; - }" -ShopCategoryDataAccessRuntimeCacheDecorator,* @var ShopCategoryDataAccessInterface,"public function getAllActive() - { - if (null !== $this->categoryCache) { - return $this->categoryCache; - }" -ShopCategoryDataAccessRuntimeCacheDecorator,* @var array|null,"public function getActiveChildren($categoryId) - { - $childIds = $this->getChildrenIds($categoryId); - $children = array(); - foreach ($childIds as $childId) { - $children[] = $this->getCategory($childId); - }" -ShopCategoryDataAccessRuntimeCacheDecorator,* @var array|null,"public function getCategory($categoryId) - { - $categoryCache = $this->getAllActive(); - if (isset($categoryCache[$categoryId])) { - return $categoryCache[$categoryId]; - }" -ShopShippingGroupDataAccessRuntimeCacheDecorator,* @var ShopShippingGroupDataAccessInterface,"public function __construct(ShopShippingGroupDataAccessInterface $subject) - { - $this->subject = $subject; - }" -ShopShippingGroupDataAccessRuntimeCacheDecorator,* @var array,"public function getPermittedUserIds($shippingGroupId) - { - $key = sprintf('permittedUserIds-%s', $shippingGroupId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingGroupDataAccessRuntimeCacheDecorator,* @param ShopShippingGroupDataAccessInterface $subject,"public function getPermittedUserGroupIds($shippingGroupId) - { - $key = sprintf('permittedUserGroupIds-%s', $shippingGroupId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingGroupDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedPortalIds($shippingGroupId) - { - $key = sprintf('permittedPortalIds-%s', $shippingGroupId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingTypeDataAccessRuntimeCacheDecorator,* @var ShopShippingTypeDataAccessInterface,"public function __construct(ShopShippingTypeDataAccessInterface $subject) - { - $this->subject = $subject; - }" -ShopShippingTypeDataAccessRuntimeCacheDecorator,"* @var array","public function getPermittedArticleGroupIds($shippingTypeId) - { - $key = sprintf('permittedArticleGroupIds-%s', $shippingTypeId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingTypeDataAccessRuntimeCacheDecorator,* @param ShopShippingTypeDataAccessInterface $subject,"public function getPermittedArticleIds($shippingTypeId) - { - $key = sprintf('permittedArticleIds-%s', $shippingTypeId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingTypeDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedCategoryIds($shippingTypeId) - { - $key = sprintf('permittedCategoryIds-%s', $shippingTypeId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingTypeDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedPortalIds($shippingTypeId) - { - $key = sprintf('permittedPortalIds-%s', $shippingTypeId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingTypeDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedCountryIds($shippingTypeId) - { - $key = sprintf('permittedCountryIds-%s', $shippingTypeId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingTypeDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedUserGroupIds($shippingTypeId) - { - $key = sprintf('permittedUserGroupIds-%s', $shippingTypeId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingTypeDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getPermittedUserIds($shippingTypeId) - { - $key = sprintf('permittedUserIds-%s', $shippingTypeId); - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -ShopShippingTypeDataAccessRuntimeCacheDecorator,* {@inheritdoc},"public function getAvailableShippingTypes($shippingGroupId, $shippingCountryId, TShopBasket $basket) - { - $parameter = array( - 'iGroupId' => $shippingGroupId, - 'dNumberOfArticles' => $basket->dTotalNumberOfArticles, - 'dWeight' => $basket->dTotalWeight, - 'dBasketVolume' => $basket->dTotalVolume, - 'dBasketValue' => $basket->dCostArticlesTotalAfterDiscounts, - ); - if ('' !== $shippingCountryId) { - $parameter['sActiveShippingCountryId'] = $shippingCountryId; - }" -ShopStockMessageDataAccessRuntimeCacheDecorator,* @var ShopStockMessageDataAccessInterface,"public function __construct(ShopStockMessageDataAccessInterface $subject) - { - $this->subject = $subject; - }" -ShopStockMessageDataAccessRuntimeCacheDecorator,* @var array,"public function getStockMessage($id, $languageId) - { - $cache = $this->getAll(); - if (isset($cache[$id])) { - return TdbShopStockMessage::GetNewInstance($cache[$id], $languageId); - }" -ShopStockMessageDataAccessRuntimeCacheDecorator,* @param ShopStockMessageDataAccessInterface $subject,"public function getAll() - { - $key = 'all'; - if (array_key_exists($key, $this->cache)) { - return $this->cache[$key]; - }" -OrderStepPageService,* @var PortalAndLanguageAwareRouterInterface,"public function __construct(PortalAndLanguageAwareRouterInterface $router, UrlUtil $urlUtil, RoutingUtilInterface $routingUtil) - { - $this->router = $router; - $this->urlUtil = $urlUtil; - $this->routingUtil = $routingUtil; - }" -OrderStepPageService,* @var UrlUtil,"public function getLinkToOrderStepPageRelative(TShopOrderStep $orderStep, array $parameters = array(), TdbCmsPortal $portal = null, TdbCmsLanguage $language = null) - { - $orderStep = $this->getOrderStepInCorrectLanguage($orderStep, $language); - $parameters = $this->addBasketStepParameter($parameters, $orderStep); - - return $this->router->generateWithPrefixes($this->getBasketStepRouteName($orderStep), $parameters, $portal, $language, UrlGeneratorInterface::ABSOLUTE_PATH); - }" -OrderStepPageService,* @var RoutingUtilInterface,"public function getLinkToOrderStepPageAbsolute(TShopOrderStep $orderStep, array $parameters = array(), TdbCmsPortal $portal = null, TdbCmsLanguage $language = null, $forceSecure = false) - { - $orderStep = $this->getOrderStepInCorrectLanguage($orderStep, $language); - $parameters = $this->addBasketStepParameter($parameters, $orderStep); - - $url = $this->router->generateWithPrefixes($this->getBasketStepRouteName($orderStep), $parameters, $portal, $language, UrlGeneratorInterface::ABSOLUTE_URL); - - if (true === $forceSecure) { - $url = $this->getSecureUrlIfNeeded($url, $portal, $language); - }" -,* SystemPageServiceInterface defines a service that provides methods to get information on system pages.,"public function getLinkToOrderStepPageRelative( - TShopOrderStep $orderStep, - array $parameters = array(), - TdbCmsPortal $portal = null, - TdbCmsLanguage $language = null - ); - - /** - * Returns a URL to the page associated with the passed order step for the passed portal in the passed language. - * - * @param TShopOrderStep $orderStep - * @param array $parameters an array of key-value parameters to add to the URL. You may also pass the 'domain' parameter - * to generate the URL for a domain other than the default. When doing this, ask an implementation - * of ChameleonSystem\CoreBundle\Util\RoutingUtilInterface::getHostRequirementPlaceholder() - * for the exact name of the domain parameter. - * @param TdbCmsPortal|null $portal if null, the active portal is used - * @param TdbCmsLanguage|null $language if null, the active language is used - * @param bool $forceSecure if true, the resulting URL will be an HTTPS URL in any case - * - * @return string - */ - public function getLinkToOrderStepPageAbsolute( - TShopOrderStep $orderStep, - array $parameters = array(), - TdbCmsPortal $portal = null, - TdbCmsLanguage $language = null, - $forceSecure = false - ); -}" -PaymentInfoService,* @var Connection,"public function __construct(Connection $databaseConnection) - { - $this->databaseConnection = $databaseConnection; - }" -PaymentInfoService,* @param Connection $databaseConnection,"public function isPaymentMethodActive($paymentMethodInternalName, \TdbCmsPortal $portal = null) - { - $query = 'SELECT COUNT(*) FROM `shop_payment_method`'; - $parameters = array(); - - if (null !== $portal) { - $query .= ""\nLEFT JOIN `shop_payment_method_cms_portal_mlt` ON `shop_payment_method`.`id` = `shop_payment_method_cms_portal_mlt`.`source_id` - WHERE (`shop_payment_method_cms_portal_mlt`.`target_id` = :portalId OR `shop_payment_method_cms_portal_mlt`.`target_id` IS NULL)""; - $query .= ' AND '; - $parameters['portalId'] = $portal->id; - }" -ProductInventoryService,* @var Connection,"public function getAvailableStock($shopArticleId) - { - /** @var int[]|false $stock */ - $stock = $this->databaseConnection->fetchNumeric( - 'SELECT `amount` FROM `shop_article_stock` WHERE `shop_article_id` = :id', - array('id' => $shopArticleId) - ); - if (is_array($stock) && isset($stock[0])) { - return (int) $stock[0]; - }" -ProductInventoryService,* {@inheritdoc},"public function addStock($shopArticleId, $stock) - { - $query = 'INSERT INTO `shop_article_stock` - SET `id` = :id, - `amount` = :amount, - `shop_article_id` = :articleId - ON DUPLICATE KEY UPDATE `amount` = `amount` + :amount - '; - $this->databaseConnection->executeQuery( - $query, - array('id' => \TTools::GetUUID(), 'amount' => $stock, 'articleId' => $shopArticleId), - array('amount' => \PDO::PARAM_INT) - ); - }" -ProductInventoryService,@var int[]|false $stock,"public function setStock($shopArticleId, $stock) - { - $query = 'INSERT INTO `shop_article_stock` - SET `id` = :id, - `amount` = :amount, - `shop_article_id` = :articleId - ON DUPLICATE KEY UPDATE `amount` = :amount - '; - $this->databaseConnection->executeQuery( - $query, - array('id' => \TTools::GetUUID(), 'amount' => $stock, 'articleId' => $shopArticleId), - array('amount' => \PDO::PARAM_INT) - ); - }" -ProductInventoryService,@var false $stock,"public function updateVariantParentStock($parentArticleId) - { - $query = 'SELECT - SUM(`shop_article_stock`.amount) AS amount - FROM `shop_article_stock` - INNER JOIN `shop_article` ON `shop_article_stock`.`shop_article_id` = `shop_article`.`id` - WHERE `shop_article`.`variant_parent_id` = :articleId - '; - $result = $this->databaseConnection->fetchNumeric($query, array('articleId' => $parentArticleId)); - $amount = (is_array($result) && isset($result[0])) ? (int) $result[0] : 0; - - $updateData = array( - 'amount' => $amount, - 'articleId' => $parentArticleId, - ); - $query = 'INSERT INTO `shop_article_stock` - SET `amount` = :amount, - `shop_article_id` = :articleId, - `id` = :id - ON DUPLICATE KEY UPDATE `amount` = :amount - '; - $updateData['id'] = \TTools::GetUUID(); - $this->databaseConnection->executeQuery( - $query, - $updateData, - array('amount' => \PDO::PARAM_INT) - ); - }" -ProductInventoryService,* {@inheritdoc},"public function setDatabaseConnection(Connection $connection) - { - $this->databaseConnection = $connection; - }" -ProductInventoryServiceCacheProxy,* @var ProductInventoryServiceInterface,"public function __construct(ProductInventoryServiceInterface $subject) - { - $this->subject = $subject; - }" -ProductInventoryServiceCacheProxy,"@var array","public function getAvailableStock($shopArticleId) - { - if (isset($this->cache['x'.$shopArticleId])) { - return $this->cache['x'.$shopArticleId]; - }" -ProductInventoryServiceCacheProxy,* {@inheritdoc},"public function addStock($shopArticleId, $stock) - { - $this->triggerCacheChange($shopArticleId); - - return $this->subject->addStock($shopArticleId, $stock); - }" -ProductInventoryServiceCacheProxy,"* {@inheritdoc} - * @psalm-suppress InvalidReturnStatement - * @FIXME Returning a void return","public function setStock($shopArticleId, $stock) - { - $this->triggerCacheChange($shopArticleId); - - return $this->subject->setStock($shopArticleId, $stock); - }" -ProductInventoryServiceCacheProxy,"* {@inheritdoc} - * @psalm-suppress InvalidReturnStatement - * @FIXME Returning a void return","public function updateVariantParentStock($parentArticleId) - { - $this->triggerCacheChange($parentArticleId); - - return $this->subject->updateVariantParentStock($parentArticleId); - }" -ProductStatisticsService,* @var Connection,"public function getStats($articleId) - { - $query = 'SELECT * FROM `shop_article_stats` WHERE `shop_article_id` = :articleId'; - $data = $this->databaseConnection->fetchAssociative($query, array('articleId' => $articleId)); - if (is_array($data)) { - $stats = $this->createStatsObject($data); - }" -ProductStatisticsService,"* @param string $articleId - * - * @return ProductStatisticsInterface","public function add($articleId, $type, $amount) - { - $field = $this->getTargetField($type); - $query = ""INSERT INTO `shop_article_stats` - SET `id` = :id, - `{$field}" -ProductStatisticsService,"* @param array $row - * - * @return ProductStatistics","public function set($articleId, $type, $amount) - { - $field = $this->getTargetField($type); - $query = ""INSERT INTO `shop_article_stats` - SET `id` = :id, - `{$field}" -ProductStatisticsService,"* @param string $articleId - * @param int $type - * @param float $amount - * @psalm-param self::TYPE_* $type - * @return void","public function updateAllBasedOnVariants($parentArticleId) - { - $query = 'SELECT - SUM(`shop_article_stats`.stats_sales) AS stats_sales, - SUM(`shop_article_stats`.`stats_detail_views`) AS stats_detail_views, - (SUM(`shop_article_stats`.`stats_review_average`)/COUNT(`shop_article`.`id`)) AS stats_review_average, - SUM(`shop_article_stats`.`stats_review_count`) AS stats_review_count - FROM `shop_article_stats` - INNER JOIN `shop_article` ON `shop_article_stats`.`shop_article_id` = `shop_article`.`id` - WHERE `shop_article`.`variant_parent_id` = :articleId - '; - $result = $this->databaseConnection->fetchAssociative($query, array('articleId' => $parentArticleId)); - if (is_array($result)) { - $stats = $this->createStatsObject($result); - }" -ProductStatisticsService,"* @param string $articleId - * @param int $type - * @param float $amount - * @psalm-param self::TYPE_* $type - * @return void","public function setDatabaseConnection(Connection $connection) - { - $this->databaseConnection = $connection; - }" -ProductVariantService,* {@inheritDoc},"public function getProductBasedOnSelection(\TdbShopArticle $shopArticle, array $typeSelection): \TdbShopArticle - { - if (true === $shopArticle->IsVariant() && \count($typeSelection) === 0) { - return $shopArticle; - }" -ShopSearchSuggest,* @var Connection,"public function __construct(Connection $databaseConnection) - { - $this->databaseConnection = $databaseConnection; - }" -ShopSearchSuggest,* @param Connection $databaseConnection,"public function getSearchSuggestions($searchTerm) - { - if ('' === trim($searchTerm)) { - return array(); - }" -ShopService,* @var string|null,"public function setDatabaseConnection(Connection $connection) - { - $this->databaseConnection = $connection; - }" -ShopService,* @var TdbShop[] - key = portalId,"public function __construct(PortalDomainServiceInterface $portalDomainService, RequestStack $requestStack, ExtranetUserProviderInterface $extranetUserProvider) - { - $this->requestStack = $requestStack; - $this->portalDomainService = $portalDomainService; - $this->extranetUserProvider = $extranetUserProvider; - }" -ShopService,* @var Connection,"public function getActiveShop() - { - return $this->getShopForPortalId($this->getActivePortalId()); - }" -ShopService,* @var RequestStack,"public function getShopForPortalId($cmsPortalId) - { - if (isset($this->shops[$cmsPortalId])) { - return $this->shops[$cmsPortalId]; - }" -ShopService,* @var PortalDomainServiceInterface,"public function getId() - { - return $this->getActiveShop()->id; - }" -ShopService,* @var ExtranetUserProviderInterface,"public function getConfiguration() - { - return $this->getActiveShop()->sqlData; - }" -ShopService,"* set to true if the recalculation of the basket has been called (and set back to false once that is done. - * - * @var bool","public function getActiveProduct() - { - $request = $this->requestStack->getCurrentRequest(); - if (null === $request) { - return null; - }" -ShopService,"* @param Connection $connection - * - * @return void","public function getActiveCategory() - { - $request = $this->requestStack->getCurrentRequest(); - if (null === $request) { - return null; - }" -ShopService,"* @param PortalDomainServiceInterface $portalDomainService - * @param RequestStack $requestStack - * @param ExtranetUserProviderInterface $extranetUserProvider","public function getActiveBasket() - { - $request = $this->requestStack->getCurrentRequest(); - if (null === $request) { - return null; - }" -ShopService,* @return string|null,"public function resetBasket() - { - $this->extranetUserProvider->getActiveUser()->ObserverUnregister('oUserBasket'); - - $request = $this->requestStack->getCurrentRequest(); - if (null === $request || false == $request->hasSession()) { - return ; - }" -ShopService,* {@inheritdoc},"public function getBasketLink($useRedirect = true) - { - $bTargetBasketPageWithoutRedirect = (false === $useRedirect); - - return $this->getActiveShop()->GetBasketLink(false, $bTargetBasketPageWithoutRedirect); - }" -ShopService,"* {@inheritdoc} - * - * @param null|string $cmsPortalId","public function getCheckoutLink($useRedirect = true) - { - $bTargetBasketPageWithoutRedirect = (false === $useRedirect); - - return $this->getActiveShop()->GetBasketLink(true, $bTargetBasketPageWithoutRedirect); - }" -BasketProductAmountValidatorTest,* @var BasketProductAmountValidator,"public function testIsAmountValid($requestedAmount, $expectedResult) - { - $this->givenABasketProductAmountValidator(); - $this->whenICallIsAmountValid($requestedAmount); - $this->thenTheExpectedValidityShouldBeReturned($expectedResult); - }" -BasketProductAmountValidatorTest,* @var bool,"public function getIsAmountValidData() - { - return array( - array( - 0, - true, - ), - array( - 1, - true, - ), - array( - 2, - true, - ), - array( - -7, - true, - ), - array( - '0', - true, - ), - array( - '2', - true, - ), - array( - '-23', - true, - ), - array( - 3.14, - false, - ), - array( - 2.00000000001, - false, - ), - array( - '3.14', - false, - ), - array( - 'a1', - false, - ), - array( - '1a', - false, - ), - ); - }" -SortStringTest,* @var SortString,"public function it_should_return_an_sort_array($sortString, $expectedArray) - { - $this->givenASortTypeWith($sortString); - $this->whenICallGetAsArray(); - $this->thenIShouldHave($expectedArray); - }" -SortStringTest,"* @test - * @dataProvider dataProviderSortRawData - * - * @param $sortString - * @param $expectedArray","public function dataProviderSortRawData() - { - return array( - array('', array()), - array('field2 ASC, field3 DESC, field4', array('field2' => 'ASC', 'field3' => 'DESC', 'field4' => 'ASC')), - array('field2 ASC, field3 DESC, field4', array('field2' => 'ASC', 'field3' => 'DESC', 'field4' => 'ASC')), - array('field2 bar, field3 DESC, field4', array('field2 bar' => 'ASC', 'field3' => 'DESC', 'field4' => 'ASC')), - array('field2 some expression ASC, some expression desc, some other expression', array('field2 some expression' => 'ASC', 'some expression' => 'DESC', 'some other expression' => 'ASC')), - ); - }" -StateFactoryTest,* @var array,"public function it_creates_state_object_from_user_input($userData, $expectedState) - { - $this->givenUserData($userData); - $this->whenWeCallTheFactoryMethod(); - $this->thenWeExpectTheState($expectedState); - }" -StateFactoryTest,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\StateInterface,"public function dataProviderUserInput() - { - $data = array(); - - // from state string plus param - $expectedState = self::getStateFactory()->createState(); - $expectedState->setState(StateInterface::PAGE, 4); - $expectedState->setState(StateInterface::PAGE_SIZE, 20); - $stateString = $expectedState->getStateString(array(StateInterface::PAGE)); - $userData = array(StateInterface::STATE_STRING => $stateString, StateInterface::PAGE => 4); - $data[] = array($userData, $expectedState); - - // from parameter array - $param = array( - StateInterface::PAGE => 5, - StateInterface::PAGE_SIZE => 21, - StateInterface::SORT => 'somesortid', - ); - $expectedState = self::getStateFactory()->createState(); - $expectedState->setState(StateInterface::PAGE, 5); - $expectedState->setState(StateInterface::PAGE_SIZE, 21); - $expectedState->setState(StateInterface::SORT, 'somesortid'); - $data[] = array($param, $expectedState); - - // nothing - $expectedState = self::getStateFactory()->createState(); - $data[] = array(array(), $expectedState); - $data[] = array(null, $expectedState); - - return $data; - }" -StateFactoryTest,* @var StateFactory,"public function it_should_create_a_state_based_on_another_state_enriched_by_default_values(StateInterface $state, array $defaultStateValues, array $expectedStateData) - { - $this->givenAState($state); - $this->givenDefaultStateValues($defaultStateValues); - $this->whenWeCallTheEnrichFactoryMethod(); - $this->thenWeExpectTheEnrichedStateToHave($expectedStateData); - }" -StateFactoryTest,* @var ConfigurationInterface,"public function dataProviderEnrichedStates() - { - $data = array(); - - $state = self::getStateFactory()->createState(); - $defaultStateValues = array( - StateInterface::PAGE_SIZE => 10, - StateInterface::SORT => 'somesortid', - ); - $data[] = array($state, $defaultStateValues, $defaultStateValues); - - $state = self::getStateFactory()->createState(); - $state->setState(StateInterface::SORT, 'newsortid'); - $state->setState(StateInterface::QUERY, 'somequery'); - $expectedResult = $defaultStateValues; - $expectedResult[StateInterface::SORT] = 'newsortid'; - $expectedResult[StateInterface::QUERY] = 'somequery'; - $data[] = array($state, $defaultStateValues, $expectedResult); - - $state = self::getStateFactory()->createState(); - $state->setState(StateInterface::PAGE_SIZE, 20); - $expectedResult = $defaultStateValues; - $expectedResult[StateInterface::PAGE_SIZE] = 20; - $data[] = array($state, $defaultStateValues, $expectedResult); - - $state = self::getStateFactory()->createState(); - $state->setState(StateInterface::PAGE, 2); - $expectedResult = $defaultStateValues; - $expectedResult[StateInterface::PAGE] = 2; - $data[] = array($state, $defaultStateValues, $expectedResult); - - $state = self::getStateFactory()->createState(); - $state->setState(StateInterface::SORT, 'newsortid'); - $expectedResult = $defaultStateValues; - $expectedResult[StateInterface::SORT] = 'newsortid'; - $data[] = array($state, $defaultStateValues, $expectedResult); - - return $data; - }" -StateTest,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\State,"public function it_should_construct_from_state_string($stateString, $expectedStateString) - { - $this->givenAStateString($stateString); - $this->whenIConstructTheStateWithTheStateStringAndQueryParameter(); - $this->thenIShouldGetAStateWithThatStateString($expectedStateString); - }" -StateTest,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\Exceptions\StateParameterException,"public function dataProviderStateString() - { - return array( - array(null, '', null), - array('', '', null), - array('p:1,s:sortid,ps:10', 'p:1,s:sortid,ps:10'), - array('p:0,s:sortid,ps:10', 's:sortid,ps:10'), - array('p:-1', ''), - array('p:', ''), - array('p:invalid', ''), - array('ps:-1', 'ps:-1'), - array('ps:', ''), - array('ps:0', ''), - array('ps:invalid', ''), - array('sortid:', ''), - ); - }" -StateTest,"* @test - * @dataProvider dataProviderStateString","public function it_should_set_state_from_string($stateString, $expectedStateString) - { - $this->givenAStateString($stateString); - $this->givenANewStateInstance(); - $this->whenISetTheStateFromString($stateString); - $this->thenIShouldGetAStateWithThatStateString($expectedStateString); - }" -StateTest,"* @test - * @dataProvider dataProviderStateString","public function it_should_set_a_state($stateKey, $stateValue, $resultValue, $exception = null) - { - $this->givenANewStateInstance(); - $this->whenISetTheStateKeyWithTheStateValue($stateKey, $stateValue); - if (null === $exception) { - $this->thenTheStateShouldHaveTheStateValueForTheStateKey($stateKey, $resultValue); - }" -StateTest,"* @test - * @dataProvider dataProviderStateKeyAndValue","public function dataProviderStateKeyAndValue() - { - $invalidValueException = new StateParameterException('', StateInterface::ERROR_CODE_INVALID_STATE_VALUE); - - return array( - array(StateInterface::SORT, '1234', '1234', null), - array(StateInterface::SORT, '', null, null), - array(StateInterface::PAGE, '-1', null, $invalidValueException), - array(StateInterface::PAGE, '0', null, null), - array(StateInterface::PAGE, '5', '5', null), - array(StateInterface::PAGE, 'invalid', null, $invalidValueException), - array(StateInterface::PAGE_SIZE, '-1', '-1', null), - array(StateInterface::PAGE_SIZE, '0', null, $invalidValueException), - array(StateInterface::PAGE_SIZE, '5', '5', null), - array(StateInterface::PAGE_SIZE, 'invalid', null, $invalidValueException), - array(StateInterface::QUERY, array('fo' => 'bar'), array('fo' => 'bar'), null), - ); - }" -StateTest,"* @test - * @dataProvider dataProviderStateArray","public function it_should_return_a_state_as_array($stateString, $queryParameter, $expectedOutput) - { - $this->givenAStateString($stateString); - $this->givenAQueryParameter($queryParameter); - $this->whenIConstructTheStateWithTheStateStringAndQueryParameter(); - $this->thenTheStateShouldReturnAStateArrayThatMatches($expectedOutput); - }" -StateTest,"* @test - * @dataProvider dataProviderStateArrayWithoutQueryParameter","public function dataProviderStateArray() - { - return array( - array('p:1,s:sortid,ps:10', null, array(StateInterface::PAGE => 1, StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), - array('p:0,s:sortid,ps:10', null, array(StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), - array('p:1,s:sortid,ps:10', array('some' => 'data', 'and' => 'somemore'), array(StateInterface::PAGE => 1, StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10, StateInterface::QUERY => array('some' => 'data', 'and' => 'somemore'))), - ); - }" -StateTest,"* @test - * @dataProvider dataProviderInputOutputStateString - * - * @param $inputStateString - * @param $queryParameter - * @param $outputStateString - * @param array $varyingParameters","public function it_should_return_a_state_as_array_without_query_parameter($stateString, $queryParameter, $expectedOutput) - { - $this->givenAStateString($stateString); - $this->givenAQueryParameter($queryParameter); - $this->whenIConstructTheStateWithTheStateStringAndQueryParameter(); - $this->thenTheStateShouldReturnAStateArrayWithoutQueryParameterThatMatches($expectedOutput); - }" -StateTest,"* @test - * @dataProvider dataProviderQueryParameter","public function dataProviderStateArrayWithoutQueryParameter() - { - return array( - array('p:1,s:sortid,ps:10', null, array(StateInterface::PAGE => 1, StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), - array('p:0,s:sortid,ps:10', null, array(StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), - array('p:1,s:sortid,ps:10', array('some' => 'data', 'and' => 'somemore'), array(StateInterface::PAGE => 1, StateInterface::SORT => 'sortid', StateInterface::PAGE_SIZE => 10)), - ); - }" -StateTest,"* @test - * @dataProvider dataProviderUrlQueryOutputTester - * - * @param $parameterIdentifier - * @param $stateString - * @param $queryData - * @param $expectedOutput","public function it_should_return_the_state_as_string($inputStateString, $queryParameter, $outputStateString, array $varyingParameters = null) - { - $this->givenAStateString($inputStateString); - $this->givenAQueryParameter($queryParameter); - $this->whenIConstructTheStateWithTheStateStringAndQueryParameter(); - $this->whenIAmVaryingTheParameter($varyingParameters); - $this->thenIShouldGetAStateWithThatStateString($outputStateString); - }" -StateTest,"* @test - * @dataProvider dataProviderSetUnsetStates - * - * @param $inputStateString - * @param $valuesSet - * @param $expectedStateValues","public function dataProviderInputOutputStateString() - { - return array( - array('p:1,s:sortid,ps:10', null, 'p:1,s:sortid,ps:10', null), - array('p:1,s:sortid,ps:10', null, 's:sortid,ps:10', array(StateInterface::PAGE)), - array('p:1,s:sortid,ps:10', null, 's:sortid', array(StateInterface::PAGE, StateInterface::PAGE_SIZE)), - array('p:1,s:sortid,ps:10', array('some' => 'value'), 'p:1,s:sortid,ps:10', null), - ); - }" -TShopPaymentHandlerPayPalExpressTest,* @test,"public function it_switches_zip_and_city_when_city_is_numeric_and_zip_is_not() - { - $testCases = array( - array( - 'adr' => array( - 'postalcode' => 'Freiburg', - 'city' => '79098', - ), - 'expectedAdr' => array( - 'postalcode' => '79098', - 'city' => 'Freiburg', - ), - ), - array( - 'adr' => array( - 'postalcode' => 'Freiburg', - 'city' => ' 79098', - ), - 'expectedAdr' => array( - 'postalcode' => '79098', - 'city' => 'Freiburg', - ), - ), - array( - 'adr' => array( - 'postalcode' => 'Freiburg', - 'city' => '079098', - ), - 'expectedAdr' => array( - 'postalcode' => '079098', - 'city' => 'Freiburg', - ), - ), - array( - 'adr' => array( - 'postalcode' => '123 Freiburg', - 'city' => '79098', - ), - 'expectedAdr' => array( - 'postalcode' => '79098', - 'city' => '123 Freiburg', - ), - ), - ); - - $reflectionMethod = new \ReflectionMethod('TShopPaymentHandlerPayPalExpress', 'postProcessBillingAndShippingAddress'); - $reflectionMethod->setAccessible(true); - $object = new \TShopPaymentHandlerPayPalExpress(); - - foreach ($testCases as $testCase) { - $adrBilling = $testCase['adr']; - $adrShipping = $testCase['adr']; - $reflectionMethod->invokeArgs($object, array($adrBilling, $adrShipping)); - $this->assertEquals($testCase['expectedAdr'], $adrBilling, 'billing does not match'); - $this->assertEquals($testCase['expectedAdr'], $adrShipping, 'shipping does not match'); - }" -TShopPaymentHandlerPayPalExpressTest,* @test,"public function it_does_not_switches_zip_and_city_when_zip_is_numeric_and_city_is_not() - { - $testCases = array( - array( - 'adr' => array( - 'postalcode' => '79098', - 'city' => 'Freiburg', - ), - 'expectedAdr' => array( - 'postalcode' => '79098', - 'city' => 'Freiburg', - ), - ), - array( - 'adr' => array( - 'postalcode' => ' 79098', - 'city' => 'Freiburg', - ), - 'expectedAdr' => array( - 'postalcode' => '79098', - 'city' => 'Freiburg', - ), - ), - array( - 'adr' => array( - 'postalcode' => '079098', - 'city' => 'Freiburg', - ), - 'expectedAdr' => array( - 'postalcode' => '079098', - 'city' => 'Freiburg', - ), - ), - array( - 'adr' => array( - 'postalcode' => '79098', - 'city' => '123 Freiburg', - ), - 'expectedAdr' => array( - 'postalcode' => '79098', - 'city' => '123 Freiburg', - ), - ), - ); - - $reflectionMethod = new \ReflectionMethod('TShopPaymentHandlerPayPalExpress', 'postProcessBillingAndShippingAddress'); - $reflectionMethod->setAccessible(true); - $object = new \TShopPaymentHandlerPayPalExpress(); - - foreach ($testCases as $testCase) { - $adrBilling = $testCase['adr']; - $adrShipping = $testCase['adr']; - $reflectionMethod->invokeArgs($object, array($adrBilling, $adrShipping)); - $this->assertEquals($testCase['expectedAdr'], $adrBilling, 'billing does not match'); - $this->assertEquals($testCase['expectedAdr'], $adrShipping, 'shipping does not match'); - }" -TShopPaymentHandlerPayPalExpressTest,* @test,"public function it_does_not_switch_zip_and_city_when_both_are_numeric() - { - $testCases = array( - array( - 'adr' => array( - 'postalcode' => '79098', - 'city' => '24234345', - ), - 'expectedAdr' => array( - 'postalcode' => '79098', - 'city' => '24234345', - ), - ), - ); - - $reflectionMethod = new \ReflectionMethod('TShopPaymentHandlerPayPalExpress', 'postProcessBillingAndShippingAddress'); - $reflectionMethod->setAccessible(true); - $object = new \TShopPaymentHandlerPayPalExpress(); - - foreach ($testCases as $testCase) { - $adrBilling = $testCase['adr']; - $adrShipping = $testCase['adr']; - $reflectionMethod->invokeArgs($object, array($adrBilling, $adrShipping)); - $this->assertEquals($testCase['expectedAdr'], $adrBilling, 'billing does not match'); - $this->assertEquals($testCase['expectedAdr'], $adrShipping, 'shipping does not match'); - }" -TdbShopArticle,* @test,"public function it_should_keep_custom_data_even_when_serializing_and_unserializing() - { - $testCustomData = array('custom' => 'data'); - $basketArticle = new TShopBasketArticleCore(); - - $basketArticle->setCustomData($testCustomData); - - $basketArticleSerialized = serialize($basketArticle); - - $unserializedArticle = unserialize($basketArticleSerialized); - - $this->assertEquals($testCustomData, $unserializedArticle->getCustomData()); - }" -TPkgShopViewMyOrderDetailsTest,"* Class TPkgShopViewMyOrderDetailsTest. - * - * @covers \TPkgShopViewMyOrderDetails","public function it_addsAnOrderToAGuestsOrderList() - { - $this->mockSessionAdapter->addOrderId('ORDERID')->shouldBeCalled(null); - $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); - - $viewMyOrderDetails->addOrderIdToMyList('ORDERID'); - }" -TPkgShopViewMyOrderDetailsTest,* @var IPkgShopViewMyOrderDetailsDbAdapter|ObjectProphecy,"public function it_addsAnOrderToAUsersOrderList() - { - $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); - - $viewMyOrderDetails->addOrderIdToMyList('ORDERID', 'USERID'); - }" -TPkgShopViewMyOrderDetailsTest,* @var IPkgShopViewMyOrderDetailsSessionAdapter|ObjectProphecy,"public function it_confirmsOrderInUsersOrderList() - { - $this->mockDbAdapter->hasOrder('USERID', 'ORDERID')->willReturn(true); - $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); - - $this->assertTrue($viewMyOrderDetails->orderIdBelongsToUser('ORDERID', 'USERID')); - }" -TPkgShopViewMyOrderDetailsTest,* @test,"public function it_confirmsOrderInGuestsOrderList() - { - $this->mockSessionAdapter->hasOrder('ORDERID')->willReturn(true); - $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); - - $this->assertTrue($viewMyOrderDetails->orderIdBelongsToUser('ORDERID')); - }" -TPkgShopViewMyOrderDetailsTest,* @test,"public function it_deniesOrderInUsersOrderList() - { - $this->mockDbAdapter->hasOrder('USERID', 'ORDERID')->willReturn(false); - $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); - - $this->assertFalse($viewMyOrderDetails->orderIdBelongsToUser('ORDERID', 'USERID')); - }" -TPkgShopViewMyOrderDetailsTest,* @test,"public function it_deniesOrderInGuestsOrderList() - { - $this->mockSessionAdapter->hasOrder('ORDERID')->willReturn(false); - $viewMyOrderDetails = new TPkgShopViewMyOrderDetails($this->mockDbAdapter->reveal(), $this->mockSessionAdapter->reveal()); - - $this->assertFalse($viewMyOrderDetails->orderIdBelongsToUser('ORDERID')); - }" -ShopPaymentConfigLoaderTest,* @test,"public function it_loads_empty_values_on_empty_configuration_in_loadFromPaymentHandlerId() - { - $this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); - $this->shopPaymentConfigLoaderDataAccess->loadPaymentHandlerGroupConfig('groupId')->willReturn(array()); - $this->shopPaymentConfigLoaderDataAccess->loadPaymentHandlerConfig('handlerId')->willReturn(array()); - - $expected = array(); - - $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); - $config = $loader->loadFromPaymentHandlerId('handlerId', 'portalId1'); - $allValues = $config->getAllValues(); - - $this->assertEquals($expected, $allValues); - }" -ShopPaymentConfigLoaderTest,* @test,"public function it_loads_correct_sandbox_configuration_in_loadFromOrderId() - { - $this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( - \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX - ); - $this->shopPaymentConfigLoaderDataAccess->getDataFromOrderId('orderId')->willReturn(new OrderPaymentInfo('orderId', 'handlerId', 'portalId1')); - $this->initFullConfig(); - $this->initFullExpectedValue(); - - $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); - $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); - - $config = $loader->loadFromOrderId('orderId'); - $allValues = $config->getAllValues(); - ksort($allValues); - - $this->assertEquals($this->expectedConfig, $allValues); - }" -ShopPaymentConfigLoaderTest,* @test,"public function it_loads_correct_sandbox_configuration_in_loadFromPaymentHandlerId() - { - $this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( - \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX - ); - $this->initFullConfig(); - $this->initFullExpectedValue(); - - $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); - $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); - - $config = $loader->loadFromPaymentHandlerId('handlerId', 'portalId1'); - $allValues = $config->getAllValues(); - ksort($allValues); - - $this->assertEquals($this->expectedConfig, $allValues); - }" -ShopPaymentConfigLoaderTest,* @test,"public function it_loads_correct_sandbox_configuration_with_default_environment_in_loadFromPaymentHandlerId() - { - $this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn('default'); - $this->initFullConfig(); - $this->initFullExpectedValue(); - - $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); - $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); - - $config = $loader->loadFromPaymentHandlerId('handlerId', 'portalId1'); - $allValues = $config->getAllValues(); - ksort($allValues); - - $this->assertEquals($this->expectedConfig, $allValues); - }" -ShopPaymentConfigLoaderTest,* @test,"public function it_loads_correct_sandbox_configuration_in_loadFromPaymentHandlerGroupId() - { - $this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( - \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX - ); - $this->initFullConfig(false); - $this->initPaymentHandlerGroupOnlyExpectedValue(); - - $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); - $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); - - $config = $loader->loadFromPaymentHandlerGroupId('groupId', 'portalId1'); - $allValues = $config->getAllValues(); - ksort($allValues); - - $this->assertEquals($this->expectedConfig, $allValues); - }" -ShopPaymentConfigLoaderTest,* @test,"public function it_loads_correct_sandbox_configuration_in_loadFromPaymentHandlerGroupSystemName() - { - $this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( - \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX - ); - $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromSystemName('groupSystemName')->willReturn('groupId'); - $this->initFullConfig(false); - $this->initPaymentHandlerGroupOnlyExpectedValue(); - - $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); - $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); - - $config = $loader->loadFromPaymentHandlerGroupSystemName('groupSystemName', 'portalId1'); - $allValues = $config->getAllValues(); - ksort($allValues); - - $this->assertEquals($this->expectedConfig, $allValues); - }" -ShopPaymentConfigLoaderTest,* @test,"public function it_throws_configuration_exception_on_error() - { - $this->shopPaymentConfigLoaderDataAccess->getEnvironment('groupId')->willReturn( - \IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX - ); - $this->shopPaymentConfigLoaderDataAccess->getPaymentHandlerGroupIdFromSystemName('groupSystemName')->willThrow(new DataAccessException('This is a test exception.')); - - $loader = $this->getShopPaymentConfigLoader(\IPkgShopOrderPaymentConfig::ENVIRONMENT_SANDBOX); - $loader->addConfigProvider('groupSystemName', $this->shopPaymentConfigProvider->reveal()); - - try { - $config = $loader->loadFromPaymentHandlerGroupSystemName('groupSystemName', 'portalId1'); - $this->fail(); - }" -ShopPaymentHandlerMock,* @var array,"public function getUserPaymentDataWithoutLoading() - { - return $this->paymentUserData; - }" -ShopPaymentHandlerMock,* @return array,"public function SetPaymentUserData(array $paymentUserData) - { - $this->paymentUserData = $paymentUserData; - }" -TPkgShopPaymentIPayment_TPkgShopPaymentIPNHandler_BaseResponse,"* process the IPN request - the request object contains all details (payment handler, group, order etc) - * the call should return true if processing should continue, false if it is to stop. On Error it should throw an error - * extending AbstractPkgShopPaymentIPNHandlerException. - * - * @param TPkgShopPaymentIPNRequest $oRequest - * @trows AbstractPkgShopPaymentIPNHandlerException - * - * @return bool","public function handleIPN(TPkgShopPaymentIPNRequest $oRequest) - { - $oStatus = $oRequest->getIpnStatus(); - if ($oStatus && 'success' === $oStatus->fieldCode) { - // #23380 some payment methods redirect the user in the last order step to an external source - there the user - // confirms (and executes) the payment and is then sent back to our thank-you-page. Only if the user arrives there is - // the order marked as completed - some users close the browser before arriving back at the shop. these orders are then never - // marked as completed - even though they are paid. This case should be handled here - $oOrder = $oRequest->getOrder(); - $aPayload = $oRequest->getRequestPayload(); - $oPaymentHandler = $oOrder->GetPaymentHandler(); - if (!is_null($oPaymentHandler)) { - $oPaymentHandler->SetPaymentUserData($aPayload); - $oPaymentHandler->SaveUserPaymentDataToOrder($oOrder->id); - }" -TPkgShopPaymentIPayment_TPkgShopPaymentIPNHandler_BaseResponse,"* return an instance of TPkgShopPaymentIPN_TransactionDetails if your IPN should trigger a transaction for the order - * (ie payment or refunds etc). if you return null, then no transaction will be triggered. - * - * @param TPkgShopPaymentIPNRequest $oRequest - * - * @return TPkgShopPaymentIPN_TransactionDetails|null","public function getIPNTransactionDetails(TPkgShopPaymentIPNRequest $oRequest) - { - $oStatus = $oRequest->getIpnStatus(); - if (null === $oStatus) { - return null; - }" -CurrencyBasket,"* Reloads the active payment method on currency change, - * so that the payment method holds the payment charges in the correct currency. - * - * {@inheritdoc}","public function SetActivePaymentMethod($oShopPayment) - { - $oldActivePaymentMethod = $this->GetActivePaymentMethod(); - $isPaymentSet = parent::SetActivePaymentMethod($oShopPayment); - $newActivePaymentMethod = $this->GetActivePaymentMethod(); - if (null === $oldActivePaymentMethod || null === $newActivePaymentMethod) { - return $isPaymentSet; - }" -ChameleonSystemShopCurrencyExtension,* @return void,"public function load(array $config, ContainerBuilder $container) - { - $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - }" -CurrencyChangedEvent,* @var string|null,"public function __construct($newCurrencyId) - { - $this->newCurrencyId = $newCurrencyId; - }" -CurrencyChangedEvent,* @param string|null $newCurrencyId,"public function getNewCurrencyId() - { - return $this->newCurrencyId; - }" -,* @return string,"public function getSymbol(); - - /** - * @return string - */ - public function getIso4217Code(); - - /** - * @param float $value - * - * @return string - */ - public function formatNumber($value); - - /** - * @return void - */ - public function reset(); - - /** - * @return TdbPkgShopCurrency|false - */ - public function getObject(); - - /** - * @param bool $bUseDefaultIfNotDefinedForUser - * - * @return string|null - */ - public function getActiveCurrencyId($bUseDefaultIfNotDefinedForUser = true); -}" -TPkgShopCurrencyMapper,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oCurrency', 'TdbPkgShopCurrency', TdbPkgShopCurrency::GetActiveInstance(), true); - }" -TPkgShopCurrencyMapper,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oCurrency TdbPkgShopCurrency */ - $oCurrency = $oVisitor->GetSourceObject('oCurrency'); - if ($oCurrency && $bCachingEnabled) { - $oCacheTriggerManager->addTrigger($oCurrency->table, $oCurrency->id); - }" -TPkgShopCurrency,"* format the double value as a string. includes the currency symbol as part of the response. - * note: will not do any conversion (we assume that dValue is already in the correct currency). - * - * @param float $dValue - * - * @return string","public function GetFormattedCurrency($dValue) - { - $oLocal = TCMSLocal::GetActive(); - $sValue = $oLocal->FormatNumber($dValue, 2).' '.$this->GetCurrencyDisplaySymbol(); - - return $sValue; - }" -TPkgShopCurrency,"* return the ISO-4217 code for the currency. - * - * @return string","public function getISO4217Code() - { - return $this->fieldIso4217; - }" -TPkgShopCurrency,"* return the symbol used to mark the currency in the shop. - * - * @return string","public function GetCurrencyDisplaySymbol() - { - return $this->fieldSymbol; - }" -TPkgShopCurrency,"* return the active currency. Currency is set defined via - * - user session - * - user cookie - * - user profile - * note: passing bReset will reset and return NOTHING. - * - * @static - * - * @return TdbPkgShopCurrency|false - * - * @deprecated use the service chameleon_system_shop_currency.shop_currency instead - * - * @param bool $bReset","public function SetAsActive() - { - $sCurrencyId = $this->id; - - /** @var Request $request */ - $request = ServiceLocator::get('request_stack')->getCurrentRequest(); - if (null !== $request && true === $request->hasSession()) { - $request->getSession()->set(TdbPkgShopCurrency::SESSION_NAME, $sCurrencyId); - }" -TPkgShopCurrency,@var $currencyService ShopCurrencyServiceInterface,"public function Convert($dValue, $oBaseCurrency = null) - { - if (null == $oBaseCurrency) { - $oBaseCurrency = TdbPkgShopCurrency::GetBaseCurrency(); - }" -TPkgShopCurrency_CMSFieldPrice,* @return string,"public function RenderFieldPostLoadString() - { - $oViewParser = new TViewParser(); - /** @var $oViewParser TViewParser */ - $oViewParser->bShowTemplatePathAsHTMLHint = false; - $aData = $this->GetFieldWriterData(); - $aData['numberOfDecimals'] = $this->_GetNumberOfDecimals(); - $aData['sValueTypeFieldName'] = $this->oDefinition->GetFieldtypeConfigKey('sValueTypeFieldName'); - $oViewParser->AddVarArray($aData); - - return $oViewParser->RenderObjectPackageView('postload', 'pkgShopCurrency/views/TCMSFields/TPkgShopCurrency_CMSFieldPrice'); - }" -TPkgShopCurrency_CMSFieldPrice,@var $oViewParser TViewParser,"public function RenderFieldPostWakeupString() - { - $oViewParser = new TViewParser(); - $oViewParser->bShowTemplatePathAsHTMLHint = false; - $aData = $this->GetFieldWriterData(); - $aData['numberOfDecimals'] = $this->_GetNumberOfDecimals(); - $oViewParser->AddVarArray($aData); - - return $oViewParser->RenderObjectPackageView('postwakeup', 'pkgShopCurrency/views/TCMSFields/TPkgShopCurrency_CMSFieldPrice'); - }" -TPkgShopCurrency_CMSFieldPrice,"* injected into the PostWakeupHook in the auto class. - * - * @return string","public function RenderFieldPropertyString() - { - $sNormalfield = parent::RenderFieldPropertyString(); - - $oViewParser = new TViewParser(); - $oViewParser->bShowTemplatePathAsHTMLHint = false; - $aData = $this->GetFieldWriterData(); - $aData['sFieldName'] = $aData['sFieldName'].'Original'; - $aData['sFieldType'] = 'double'; - - $oViewParser->AddVarArray($aData); - - $sNormalfield .= ""\n"".$oViewParser->RenderObjectView('property', 'TCMSFields/TCMSField'); - - return $sNormalfield; - }" -MTPkgShopCurrencyChangeCurrencyCore,"* used to show available currencies to the user and to provide a method to change the currency. -/*","public function Execute() - { - parent::Execute(); - - $this->data['oActiveCurrency'] = TdbPkgShopCurrency::GetActiveInstance(); - $this->data['oCurrencyList'] = TdbPkgShopCurrencyList::GetList(); - - return $this->data; - }" -MTPkgShopCurrencyChangeCurrencyCore,* @return void,"public function _AllowCache() - { - return true; - }" -MTPkgShopCurrencyChangeCurrencyCore,"* if this function returns true, then the result of the execute function will be cached. - * - * @return bool","public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - $parameters['sActiveCurrency'] = TdbPkgShopCurrency::GetActiveCurrencyId(); - - return $parameters; - }" -MTPkgShopCurrencyChangeCurrencyCore,"* return an assoc array of parameters that describe the state of the module. - * - * @return array","public function _GetCacheTableInfos() - { - $aTrigger = parent::_GetCacheTableInfos(); - if (!is_array($aTrigger)) { - $aTrigger = array(); - }" -TPkgShopCurrency_PkgCmsActionPlugin,"* @param array $aData - * @param bool $bRedirect - * @return void","public function ChangeCurrency($aData, $bRedirect = true) - { - $sId = (isset($aData['sPkgShopCurrencyId'])) ? ($aData['sPkgShopCurrencyId']) : (''); - if (empty($sId)) { - return; - }" -TPkgCmsNavigation_CurrencySelection,"* add currency selection menu. -/*","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('aTree', 'array', array()); - }" -TPkgCmsNavigation_CurrencySelection,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oCurrencyList = TdbPkgShopCurrencyList::GetList(); - if ($oCurrencyList->Length() < 2) { - return; - }" -CurrencyRequestStateProvider,* @var RequestInfoServiceInterface,"public function __construct( - RequestInfoServiceInterface $requestInfoService, - ShopCurrencyServiceInterface $currencyService - ) { - $this->requestInfoService = $requestInfoService; - $this->currencyService = $currencyService; - }" -CurrencyRequestStateProvider,* @var ShopCurrencyServiceInterface,"public function getStateElements(Request $request) - { - if (false === $this->requestInfoService->isChameleonRequestType(RequestTypeInterface::REQUEST_TYPE_FRONTEND)) { - return []; - }" -ShopCurrencyService,* @var RequestStack,"public function __construct(RequestStack $requestStack, ExtranetUserProviderInterface $extranetUserProvider) - { - $this->requestStack = $requestStack; - $this->extranetUserProvider = $extranetUserProvider; - }" -ShopCurrencyService,* @var ExtranetUserProviderInterface,"public function getSymbol() - { - return $this->getObject()->GetCurrencyDisplaySymbol(); - }" -ShopCurrencyService,* {@inheritdoc},"public function getIso4217Code() - { - return $this->getObject()->getISO4217Code(); - }" -ShopCurrencyService,* {@inheritdoc},"public function formatNumber($value) - { - return $this->getObject()->GetFormattedCurrency($value); - }" -ShopCurrencyService,* {@inheritdoc},"public function getObject() - { - $activeCurrencyId = $this->getActiveCurrencyId(); - if (null === $activeCurrencyId || $activeCurrencyId === TdbPkgShopCurrency::GetDefaultCurrency()->id) { - return TdbPkgShopCurrency::GetDefaultCurrency(); - }" -ShopCurrencyService,* {@inheritdoc},"public function reset() - { - // in the past there was built-in cache logic in this class - moved to ShopCurrencyServiceRequestLevelCacheDecorator. - }" -ShopCurrencyService,* {@inheritdoc},"public function getActiveCurrencyId($bUseDefaultIfNotDefinedForUser = true) - { - $request = $this->requestStack->getCurrentRequest(); - if (null === $request || false === $request->hasSession() || false === $request->getSession()->isStarted()) { - return null; - }" -ShopCurrencyServiceRequestLevelCacheDecorator,* @var array,"public function __construct(ShopCurrencyServiceInterface $subject) - { - $this->subject = $subject; - }" -ShopCurrencyServiceRequestLevelCacheDecorator,* @var ShopCurrencyServiceInterface,"public function getSymbol() - { - $cacheKey = 'getSymbol'; - if (isset($this->cache[$cacheKey])) { - return $this->cache[$cacheKey]; - }" -ShopCurrencyServiceRequestLevelCacheDecorator,* @param ShopCurrencyServiceInterface $subject,"public function getIso4217Code() - { - $cacheKey = 'getIso4217Code'; - if (isset($this->cache[$cacheKey])) { - return $this->cache[$cacheKey]; - }" -ShopCurrencyServiceRequestLevelCacheDecorator,* {@inheritdoc},"public function formatNumber($value) - { - return $this->subject->formatNumber($value); - }" -ShopCurrencyServiceRequestLevelCacheDecorator,* {@inheritdoc},"public function reset() - { - $this->subject->reset(); - $this->cache = array(); - }" -ShopCurrencyServiceRequestLevelCacheDecorator,* {@inheritdoc},"public function getObject() - { - $cacheKey = 'getObject'; - if (isset($this->cache[$cacheKey])) { - return $this->cache[$cacheKey]; - }" -ShopCurrencyServiceRequestLevelCacheDecorator,* {@inheritdoc},"public function getActiveCurrencyId($bUseDefaultIfNotDefinedForUser = true) - { - $cacheKey = ""getActiveCurrencyId-$bUseDefaultIfNotDefinedForUser""; - if (isset($this->cache[$cacheKey])) { - return $this->cache[$cacheKey]; - }" -TPkgShopDhlPackstation_TPkgExtranetMapper_AddressForm,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); - - $oAddress = $oVisitor->GetSourceObject('oAddressObject'); - $aFieldList = array('aFieldPackstation' => 'is_dhl_packstation'); - $this->SetInputFields($aFieldList, $oVisitor, $oAddress, 'checkbox'); - }" -TPkgShopDhlPackstation_DataExtranetUser,"* set address as new billing address... will check if the address belongs to the user. - * - * @param string $sAddressId - * - * @return TdbDataExtranetUserAddress|null|false","public function SetAddressAsBillingAddress($sAddressId) - { - $oNewBillingAdr = null; - if (0 != strcmp($this->fieldDefaultBillingAddressId, $sAddressId)) { - $oAdr = TdbDataExtranetUserAddress::GetNewInstance(); - if ($oAdr->LoadFromFields( - array('id' => $sAddressId, 'data_extranet_user_id' => $this->id, 'is_dhl_packstation' => '0') - ) - ) { - $this->SaveFieldsFast(array('default_billing_address_id' => $sAddressId)); - $oNewBillingAdr = $this->GetBillingAddress(true); - }" -TPkgShopDhlPackstation_DataExtranetUser,"* clear field for type change after updating address. - * - * @param array $aAddressData - * - * @return bool","public function UpdateShippingAddress($aAddressData) - { - $aAddressData = $this->fillPackStationFieldValue($aAddressData); - $bChangeDHLPackStation = $this->DHLPackStationStatusChanged($aAddressData); - $bIsDHLPackStation = ('0' == $aAddressData['is_dhl_packstation']) ? false : true; - $bUpdated = parent::UpdateShippingAddress($aAddressData); - if (true === $bUpdated && true === $bChangeDHLPackStation) { - $oShippingAddress = $this->GetShippingAddress(); - if (false === is_null($oShippingAddress)) { - $oShippingAddress->SetIsDhlPackstation($bIsDHLPackStation, false); - }" -TPkgShopDhlPackstation_DataExtranetUser,"* add pack station field if missing in address data. - * - * @param array $aAddressData - * - * @return array","public function fillPackStationFieldValue($aAddressData) - { - if (is_array($aAddressData) && false === isset($aAddressData['is_dhl_packstation'])) { - $aAddressData['is_dhl_packstation'] = 0; - }" -TPkgShopDhlPackstation_DataExtranetUser,"* check if address type status changed. - * - * @param array $aAddressData - * - * @return bool","public function DHLPackStationStatusChanged($aAddressData) - { - $bChangeDHLPackStation = false; - $aAddressData = $this->fillPackStationFieldValue($aAddressData); - $bIsDHLPackStation = ('0' == $aAddressData['is_dhl_packstation']) ? false : true; - $oOldAddress = clone $this->GetShippingAddress(); - if ($bIsDHLPackStation != $oOldAddress->fieldIsDhlPackstation) { - $bChangeDHLPackStation = true; - }" -TPkgShopDhlPackstation_DataExtranetUserAddress,"* @param bool $bIsPackstation - * @param bool $bSave set to false if you not want to save cleard fiel values - * - * @return void","public function SetIsDhlPackstation($bIsPackstation, $bSave = true) - { - $aData = $this->sqlData; - if ($bIsPackstation) { - $aClear = array('company', 'address_additional_info', 'streetnr'); - }" -TPkgShopDhlPackstation_DataExtranetUserAddress,"* return array with required fields. - * - * @return string[]","public function GetRequiredFields() - { - $aRequiredFields = parent::GetRequiredFields(); - if ($this->fieldIsDhlPackstation) { - $aRequiredFields[] = 'address_additional_info'; - $sKey = array_search('telefon', $aRequiredFields); - if (false !== $sKey) { - unset($aRequiredFields[$sKey]); - }" -TPkgShopDhlPackstation_ShopStepUserDataV2,"* define any methods of the class that may be called via get or post. - * - * @return array","public function AllowedMethods() - { - $aExternalFunctions = parent::AllowedMethods(); - $aExternalFunctions[] = 'ChangeShippingAddressIsPackstationState'; - - return $aExternalFunctions; - }" -TPkgShopDhlPackstation_ShopStepUserDataV2,"* switch the current shipping address from being a packstation address to a normal address and back. - * - * @return void","public function ChangeShippingAddressIsPackstationState() - { - $this->SetPreventProcessStepMethodFromExecuting(true); - - $bIsDhlPackstation = false; - $aShipping = $this->GetShippingAddressData(); - if (is_array($aShipping) && array_key_exists('is_dhl_packstation', $aShipping)) { - $bIsDhlPackstation = ('1' == $aShipping['is_dhl_packstation']) ? (true) : (false); - }" -TPkgShopDhlPackstation_ShopStepUserDataV2,"* set state of ship to billing yes/no. - * - * if the user wants shipping=billing, then we can only allow this if the new target - * - * @param string $sShipToBillingAddress - * - * @return void","public function ChangeSelectedAddress() - { - $oUser = self::getExtranetUserProvider()->getActiveUser(); - if ($oUser->IsLoggedIn()) { - $newShippingAddressId = $this->GetShippingAddressData('selectedAddressId'); - $newBillingAddressId = $this->GetBillingAddressData('selectedAddressId'); - if ('new' !== $newShippingAddressId) { - $this->updateStepAddressDataForAddressId($newShippingAddressId, $newBillingAddressId); - - if ($newShippingAddressId === $newBillingAddressId && - true === $this->isShipToBillingAddressAndBillingAddressIsPackstation() - ) { - $this->SetShipToBillingAddress('0'); - $newBillingAddress = $oUser->GetBillingAddress(); - $this->SetBillingAddressData($newBillingAddress->sqlData); - $this->getFlashMessageService()->addMessage( - TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING, - 'PkgShopDhlPackstation-ERROR-BILLING-MAY-NOT-BE-PACKSTATION' - ); - }" -Configuration,* @return bool,"public function allowUseOfPostSearchFilter() - { - return $this->fieldCanBeFiltered; - }" -DbAdapter,* @var Connection,"public function getFilterableListInstanceIdOnPage($pageId) - { - // find module instances of type x on page with setting y - $query = ""SELECT `shop_module_article_list`.`cms_tpl_module_instance_id` - FROM `shop_module_article_list` - INNER JOIN `cms_tpl_page_cms_master_pagedef_spot` ON `shop_module_article_list`.`cms_tpl_module_instance_id` = `cms_tpl_page_cms_master_pagedef_spot`.`cms_tpl_module_instance_id` - WHERE `shop_module_article_list`.`can_be_filtered` = '1' - AND `cms_tpl_page_cms_master_pagedef_spot`.`cms_tpl_page_id` = :pageId - ""; - - /** @psalm-var false|non-empty-list $instanceData */ - $instanceData = $this->getDatabaseConnection()->fetchNumeric($query, array('pageId' => $pageId)); - if (false === $instanceData) { - return null; - }" -DbAdapter,"* @param string $pageId - * - * @return string|null","public function setDatabaseConnection(Connection $connection) - { - $this->databaseConnection = $connection; - }" -DbAdapter,@psalm-var false|non-empty-list $instanceData,"public function getFilterableListInstanceSpotOnPage($pageId) - { - // find module instances of type x on page with setting y - $query = ""SELECT `cms_master_pagedef_spot`.`name` - FROM `shop_module_article_list` - INNER JOIN `cms_tpl_page_cms_master_pagedef_spot` ON `shop_module_article_list`.`cms_tpl_module_instance_id` = `cms_tpl_page_cms_master_pagedef_spot`.`cms_tpl_module_instance_id` - INNER JOIN `cms_master_pagedef_spot` ON `cms_tpl_page_cms_master_pagedef_spot`.`cms_master_pagedef_spot_id` = `cms_master_pagedef_spot`.`id` - WHERE `shop_module_article_list`.`can_be_filtered` = '1' - AND `cms_tpl_page_cms_master_pagedef_spot`.`cms_tpl_page_id` = :pageId - ""; - $instanceData = $this->getDatabaseConnection()->fetchNumeric($query, array('pageId' => $pageId)); - if (false === $instanceData) { - return null; - }" -,* @return bool,"public function allowUseOfPostSearchFilter(); -}" -ChameleonSystemShopListFilterExtension,* @return void,"public function load(array $config, ContainerBuilder $container) - { - $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - }" -,* @return string,"public function getArticleListQuery(); - - /** - * @return array - */ - public function getArticleListFilterRelevantState(); - - /** - * @return bool - */ - public function allowCache(); - - /** - * @return array - */ - public function getCacheParameter(); - - /** - * @return array - */ - public function getCacheTrigger(); - - /** - * @return ResultFactoryInterface - */ - public function getResultFactory(); - - /** - * @return ConfigurationInterface - */ - public function getListConfiguration(); - - /** - * @return StateInterface - */ - public function getArticleListState(); -}" -,"* @psalm-suppress UndefinedDocblockClass - * @FIXME FilterFacetInterface does not exist - is this interface still in use and if yes: What should it return? - * @return FilterFacetInterface[]","public function getFacets(); -}" -AbstractPkgShopListfilterMapper_Filter,* {@inheritdoc},"public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oFilterItem', 'TdbPkgShopListfilterItem'); - $oRequirements->NeedsSourceObject('oActiveFilter', 'TdbPkgShopListfilter', TdbPkgShopListfilter::GetActiveInstance()); - }" -AbstractPkgShopListfilterMapper_Filter,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oFilterItem TdbPkgShopListfilterItem */ - $oFilterItem = $oVisitor->GetSourceObject('oFilterItem'); - $aFilterData = array( - 'sTitle' => $oFilterItem->fieldName, - 'sInputURLName' => $oFilterItem->GetURLInputName(), - 'sResetURL' => $oFilterItem->GetAddFilterURL(''), - 'bActive' => $oFilterItem->IsActive(), - ); - $oVisitor->SetMappedValueFromArray($aFilterData); - }" -TPkgShopListfilterMapper_FilterBoolean,@var $oFilterItem TPkgShopListfilterItemBoolean,"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); - - /** @var $oFilterItem TPkgShopListfilterItemBoolean */ - $oFilterItem = $oVisitor->GetSourceObject('oFilterItem'); - $aFilterData = array( - '0' => array( - 'sValue' => '', - 'bActive' => false, - 'iCount' => 0, - 'sURL' => '#', - ), - '1' => array( - 'sValue' => '', - 'bActive' => false, - 'iCount' => 0, - 'sURL' => '#', - ), - ); - - $aOptions = $oFilterItem->GetOptions(); - $iActiveValue = $oFilterItem->GetActiveValue(); - foreach ($aOptions as $sValue => $iCount) { - $aFilterData[$sValue] = array( - 'sValue' => $sValue, - 'bActive' => $sValue == $iActiveValue, - 'iCount' => $iCount, - 'sURL' => $oFilterItem->GetAddFilterURL($sValue), - ); - }" -TPkgShopListfilterMapper_FilterNumericSlider,* {@inheritdoc},"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); - - /** @var $oFilterItem TPkgShopListfilterItemNumeric */ - $oFilterItem = $oVisitor->GetSourceObject('oFilterItem'); - /** @var $oActiveFilter TdbPkgShopListfilter */ - $oActiveFilter = $oVisitor->GetSourceObject('oActiveFilter'); - - $userDataValueLow = false; - $userDataValueHigh = false; - $userData = $oActiveFilter->GetCurrentFilterAsArray(); - if (count($userData) > 0) { - $dStartAmountTmp = $oFilterItem->GetActiveStartValue(); - if (!empty($dStartAmountTmp)) { - $userDataValueLow = $dStartAmountTmp; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@var $oFilterItem TPkgShopListfilterItemNumeric,"public function setDisabled($disabled) - { - // slider need that as string - $this->disabled = ($disabled) ? 'true' : 'false'; - - return $this; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@var $oActiveFilter TdbPkgShopListfilter,"public function getDisabled() - { - return $this->disabled; - }" -TPkgShopListfilterMapper_FilterNumericSlider,"* no articles - * $lowestArticlePrice = $highestArticlePrice = 0.","public function setMax($max) - { - $this->max = $max; - - return $this; - }" -TPkgShopListfilterMapper_FilterNumericSlider,"* 1 article - * $lowestArticlePrice = $highestArticlePrice - * slider - * range (values): - * - $lowestArticlePrice (rounded down) - * - $highestArticlePrice (rounded up) - * selected (min & max): - * - $lowestArticlePrice (rounded down) - * - $highestArticlePrice (rounded up) - * - *** IGNORE url input - * disabled: - * - true - * step: - * - $highestArticlePrice (rounded up) - $lowestArticlePrice (rounded down).","public function getMax() - { - return $this->max; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@psalm-suppress InvalidCast,"public function setMin($min) - { - $this->min = $min; - - return $this; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@psalm-suppress InvalidCast,"public function getMin() - { - return $this->min; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@psalm-suppress InvalidCast,"public function setStep($step) - { - $this->step = $step; - - return $this; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@psalm-suppress InvalidCast,"public function getStep() - { - return $this->step; - }" -TPkgShopListfilterMapper_FilterNumericSlider,* at least 2.,"public function setValueHigh($valueHigh) - { - $this->valueHigh = $valueHigh; - - return $this; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@psalm-suppress InvalidCast,"public function getValueHigh() - { - return $this->valueHigh; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@psalm-suppress InvalidCast,"public function setValueLow($valueLow) - { - $this->valueLow = $valueLow; - - return $this; - }" -TPkgShopListfilterMapper_FilterNumericSlider,"* as the $stepSize is rounded - * ($lowestArticlePrice + ($stepCount * $stepSize) can be higher than the actual $highestArticlePrice - * this would mess up the behaviour between the slider and the selects. - * - * => set $highestArticlePrice based on last option element in $selectToPrice","public function getValueLow() - { - return $this->valueLow; - }" -TPkgShopListfilterMapper_FilterNumericSlider,"* @param float $value - * - * @return float","public function setDisabled($disabled) - { - $this->disabled = $disabled; - - return $this; - }" -TPkgShopListfilterMapper_FilterNumericSlider,"* @param float $value - * - * @return float","public function getDisabled() - { - return $this->disabled; - }" -TPkgShopListfilterMapper_FilterNumericSlider,"* String representation of the boolean - * @var string - * @psalm-var 'true'|'false'","public function setSelectedOption($selectedOption) - { - $this->selectedOption = $selectedOption; - - return $this; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@var int,"public function getSelectedOption() - { - return $this->selectedOption; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@var int,"public function setOptions($options) - { - $this->options = $options; - - return $this; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@var int,"public function addOption($option) - { - if (false === in_array($option, $this->options)) { - $this->options[] = $option; - }" -TPkgShopListfilterMapper_FilterNumericSlider,@var int,"public function getOptions() - { - return $this->options; - }" -TPkgShopListfilterMapper_FilterStandard,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); - - /** @var $oFilterItem TPkgShopListfilterItemMultiselect */ - $oFilterItem = $oVisitor->GetSourceObject('oFilterItem'); - - /** @var $oActiveFilter TdbPkgShopListfilter */ - $oActiveFilter = $oVisitor->GetSourceObject('oActiveFilter'); - - $aFilterData = array(); - $aOptions = $oFilterItem->GetOptions(); - foreach ($aOptions as $sValue => $iCount) { - $aFilterData[] = array( - 'sValue' => $sValue, - 'bActive' => $oFilterItem->IsSelected(trim($sValue)), - 'iCount' => $iCount, - 'sURL' => $oFilterItem->GetAddFilterURL(trim($sValue)), - 'bAllowMultiSelect' => $oFilterItem->fieldAllowMultiSelection, - ); - }" -TPkgShopListfilterMapper_Variants,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - parent::GetRequirements($oRequirements); - $oRequirements->NeedsSourceObject('sShopVariantTypeIds', 'string'); - $oRequirements->NeedsSourceObject('aFilterData', 'array'); - }" -TPkgShopListfilterMapper_Variants,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - parent::Accept($oVisitor, $bCachingEnabled, $oCacheTriggerManager); - - $aFilterData = $oVisitor->GetSourceObject('aFilterData'); - $sShopVariantTypeIds = $oVisitor->GetSourceObject('sShopVariantTypeIds'); - - $aRestriction = array(); - reset($aFilterData); - foreach ($aFilterData as $aFilter) { - $aRestriction[] = MySqlLegacySupport::getInstance()->real_escape_string($aFilter['sValue']); - }" -FilterApi,* @var DbAdapter,"public function __construct( - RequestStack $requestStack, - DbAdapter $dbAdapter, - DbAdapterInterface $listDbAdapter, - StateFactoryInterface $stateFactory, - ResultFactoryInterface $resultFactory, - ActivePageServiceInterface $activePageService, - CacheInterface $cache, - StateRequestExtractorCollectionInterface $stateRequestExtractorCollection - ) { - $this->dbAdapter = $dbAdapter; - $this->listDbAdapter = $listDbAdapter; - $this->stateFactory = $stateFactory; - $this->requestStack = $requestStack; - $this->resultFactory = $resultFactory; - $this->activePageService = $activePageService; - $this->cache = $cache; - $this->stateRequestExtractorCollection = $stateRequestExtractorCollection; - }" -FilterApi,* @var DbAdapterInterface,"public function getArticleListQuery() - { - $config = $this->getListConfiguration(); - - return $this->resultFactory->getFilterQuery($config); - }" -FilterApi,* @var StateFactoryInterface,"public function getArticleListFilterRelevantState() - { - $state = $this->getArticleListState(); - - $parameterIdentifier = $this->getArticleListSpotName(); - - return $state->getStateAsUrlQueryArray($parameterIdentifier, array(StateInterface::PAGE)); - }" -FilterApi,* @var RequestStack,"public function getListConfiguration() - { - if (null !== $this->listModuleConfig) { - return $this->listModuleConfig; - }" -FilterApi,* @var ResultFactoryInterface,"public function allowCache() - { - return $this->resultFactory->_AllowCache($this->getListConfiguration()); - }" -FilterApi,* @var ConfigurationInterface,"public function getCacheParameter() - { - return $this->resultFactory->_GetCacheParameters($this->getListConfiguration(), $this->getArticleListState()); - }" -FilterApi,* @var ActivePageServiceInterface,"public function getCacheTrigger() - { - return $this->resultFactory->_GetCacheTableInfos($this->getListConfiguration()); - }" -FilterApi,* @var string|null,"public function getArticleListState() - { - if (null !== $this->articleListState) { - return $this->articleListState; - }" -FilterApi,* @var StateInterface,"public function getResultFactory() - { - return $this->resultFactory; - }" -TPkgShopListfilter,* @var null|array,"public function setListState(array $listState) - { - $this->listState = $listState; - }" -TPkgShopListfilter,* @var string,"public function getListSate() - { - return $this->listState; - }" -TPkgShopListfilter,* @var array,"public function getActiveFilterAsQueryString() - { - $oFilterList = $this->GetFieldPkgShopListfilterItemList(); - - return $oFilterList->GetQueryRestriction(); - }" -TPkgShopListfilter,"* return the active instance based on the active category or shop config - * Attention: If list filter has configured a static filter the static filter data was added to post data - * within this function. - * - * @return TdbPkgShopListfilter|null","public function isStaticFilter(TdbPkgShopListfilterItem $filter) - { - if (!is_array($this->staticFilter)) { - return false; - }" -TPkgShopListfilter,@var $filterApi FilterApiInterface,"public function setArticleListQuery($articleListQuery) - { - $this->articleListQuery = $articleListQuery; - }" -TPkgShopListfilter,"* @param array $listState - * @return void","public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - /** @var $oView TViewParser */ - $oView->AddVar('oListfilter', $this); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, TdbPkgShopListfilter::VIEW_PATH, $sViewType); - }" -TPkgShopListfilter,* @return TdbPkgShopListfilter|null,"public function GetFieldPkgShopListfilterItemList() - { - $oList = $this->GetFromInternalCache('FieldPkgShopListfilterItemList'); - if (is_null($oList)) { - $aTrigger = array('class' => __CLASS__, 'method' => 'GetFieldPkgShopListfilterItemList', 'id' => $this->id); - $aTrigger['activeFilter'] = TGlobal::instance()->GetUserData(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA); - $bCaching = false; - if (!is_array($aTrigger['activeFilter']) || 0 == count($aTrigger['activeFilter'])) { - $bCaching = true; - }" -TPkgShopListfilter,* @return array,"public function GetCurrentFilterAsHiddenInputFields() - { - $oList = $this->GetFieldPkgShopListfilterItemList(); - - return $oList->GetListSettingAsInputFields(); - }" -TPkgShopListfilter,* @return string,"public function GetCurrentFilterAsArray() - { - $aFilterAsArray = $this->GetFromInternalCache('aFilterAsArray'); - if (is_null($aFilterAsArray)) { - $oList = $this->GetFieldPkgShopListfilterItemList(); - $aFilterAsArray = $oList->GetListSettingAsArray(); - $this->SetInternalCache('aFilterAsArray', $aFilterAsArray); - }" -TPkgShopListfilter,"* @param string $staticFilter - * - * @return void","public function GetFilterValuesForFilterType($sFilterSystemName) - { - /** @var array|null $aActiveFilter */ - $aActiveFilter = $this->GetFromInternalCache('aFilterDataAsArrayFor'.$sFilterSystemName); - - if (is_null($aActiveFilter)) { - $aActiveFilter = false; - - $aFilterData = $this->GetCurrentFilterAsArray(); - if (is_array($aFilterData) && array_key_exists(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA, $aFilterData) && is_array($aFilterData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA]) && count($aFilterData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA]) > 0) { - $aFilterData = $aFilterData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA]; - $oFilterId = TdbPkgShopListfilterItem::GetNewInstance(); - if ($oFilterId->LoadFromFields(array('pkg_shop_listfilter_id' => $this->id, 'systemname' => $sFilterSystemName))) { - if (is_array($aFilterData) && array_key_exists($oFilterId->id, $aFilterData)) { - if (is_array($aFilterData[$oFilterId->id]) && count($aFilterData[$oFilterId->id]) > 0) { - $aActiveFilter = $aFilterData[$oFilterId->id]; - }" -TPkgShopListfilterItem,"* you need to set this to the field name you want to filter by. - * - * @var string","public function GetURLInputName() - { - return urlencode(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA).'['.urlencode($this->id).']'; - }" -TPkgShopListfilterItem,"* the item list filtered by all other listfilter item aside from this one. - * - * @var TCMSRecordList|null","public function GetActiveSettingAsHiddenInputField() - { - /** - * @psalm-suppress InvalidArgument - * @FIXME Passing an array (`aActiveFilterData`) to `TGlobal::OutHTML` which expects a string. Due to `htmlentities` being used in that method, this will return an empty string up to PHP7.4 but result in an fatal error in PHP8+ - */ - return 'GetURLInputName()).'"" value=""'.TGlobal::OutHTML($this->aActiveFilterData).'"" />'; - }" -TPkgShopListfilterItem,"* the current user selection for the filter. - * - * @var array|null","public function GetActiveSettingAsArray() - { - $aData = array(); - if (is_array($this->aActiveFilterData) || !empty($this->aActiveFilterData)) { - $aData = array(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA => array($this->id => $this->aActiveFilterData)); - }" -TPkgShopListfilterItem,* @var bool,"public function GetAddFilterURL($sValue) - { - // @todo: the sorting is lost here (#29269) - $oActiveListfilter = TdbPkgShopListfilter::GetActiveInstance(); - $aURLData = $oActiveListfilter->GetCurrentFilterAsArray(); - $aURLData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA][$this->id] = $sValue; - $aURLData[TdbPkgShopListfilter::URL_PARAMETER_IS_NEW_REQUEST] = '1'; - - return $this->getActivePageService()->getLinkToActivePageRelative($aURLData); - }" -TPkgShopListfilterItem,"* {@inheritdoc} - * - * @return void","public function SetFilteredItemList($oItemListFilteredByOtherItems) - { - $this->oItemListFilteredByOtherItems = $oItemListFilteredByOtherItems; - }" -TPkgShopListfilterItem,"* called when an object recovers from serialization. - * - * @return void","public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - $aOptions = array(); - $sIdSelect = $this->GetResultSetBaseQuery(); - - if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { - $sItemQuery = ""SELECT `shop_article`.`{$this->sItemFieldName}" -TPkgShopListfilterItem,* @return void,"public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - /** @var $oView TViewParser */ - $oView->AddVar('oListItem', $this); - $oView->AddVar('oFilterType', $this->GetFieldPkgShopListfilterItemType()); - $oView->AddVar('aCallTimeVars', $aCallTimeVars); - $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType); - $oView->AddVarArray($aOtherParameters); - - return $oView->RenderObjectPackageView($sViewName, TdbPkgShopListfilterItem::VIEW_PATH, $sViewType); - }" -TPkgShopListfilterItem,"* @param array|string $aData - * @psalm-param array|'' $aData - * @return array|null - Returns `null` if the resulting array would be empty or if an empty string was passed as input.","public function GetQueryRestrictionForActiveFilter() - { - return ''; - }" -TPkgShopListfilterItem,"* overload view settings from filter-type if nothing is set in this filter-item. - * - * @return void","public function IsActive() - { - return $this->bIsActive; - }" -TPkgShopListfilterItemList,"* create a new instance. - * - * @param string|null $sQuery - * @param string|null $iLanguageId","public function __construct($sQuery = null, $iLanguageId = null) - { - $this->bAllowItemCache = true; - parent::__construct($sQuery, $iLanguageId); - }" -TPkgShopListfilterItemList,"* return sql condition for the current filter list. optionaly excluding the element passed. - * - * @param TdbPkgShopListfilterItem $oExcludeItem - * @param bool $bReturnAsArray - set to true if you want an array with the query parts instead of a string - * - * @return string|string[] - * @psalm-return ($bReturnAsArray is true ? string[] : string)","public function GetQueryRestriction($oExcludeItem = null, $bReturnAsArray = false) - { - $sQuery = ''; - $aQueryItems = array(); - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - if (is_null($oExcludeItem) || !$oExcludeItem->IsSameAs($oItem)) { - $sTmpQuery = trim($oItem->GetQueryRestrictionForActiveFilter()); - if (!empty($sTmpQuery)) { - $aQueryItems[] = $sTmpQuery; - }" -TPkgShopListfilterItemList,"* return the setting of the list element as input fields (hidden). - * - * @return string","public function GetListSettingAsInputFields() - { - $sInput = ''; - $aInputItems = array(); - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - $sTmp = trim($oItem->GetActiveSettingAsHiddenInputField()); - if (!empty($sTmp)) { - $aInputItems[] = $sTmp; - }" -TPkgShopListfilterItemList,"* return the setting of the list element as input fields (hidden). - * - * @return array","public function GetListSettingAsArray() - { - $aSettings = array(); - $iPointer = $this->getItemPointer(); - $this->GoToStart(); - while ($oItem = $this->Next()) { - $aTmpSetting = $oItem->GetActiveSettingAsArray(); - $aSettings = array_merge_recursive($aSettings, $aTmpSetting); - }" -TPkgShopListfilterItemBoolean,"* return the current active value (0 or 1). if none is set, we will return 0. - * - * @return int - * @psalm-suppress InvalidReturnType, InvalidReturnStatement - * @FIXME We can't be sure that the return type is `int`. Better add a cast here.","public function GetActiveValue() - { - $iValue = $this->aActiveFilterData; - if (is_null($iValue) || ('0' != $iValue && '1' != $iValue)) { - $iValue = ''; - }" -TPkgShopListfilterItemCategoryTree,"* you need to set this to the table name of the connected table. - * - * @var string","public function GetTreeFromValueList() - { - $aValues = $oListItem->GetOptions(); - }" -TPkgShopListfilterItemIsNew,"* you need to set this to the field name you want to filter by. - * - * @var string","public function GetQueryRestrictionForActiveFilter() - { - $sQuery = ''; - $sValue = $this->GetActiveValue(); - if ('1' == $sValue || '0' == $sValue) { - $sQuery = ""`shop_article`.`{$this->sItemFieldName}" -TPkgShopListfilterItemIsOnStock,"* you need to set this to the field name you want to filter by. - * - * @var string","public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { - $oObj = clone $this->oItemListFilteredByOtherItems; - $iCount = $this->oItemListFilteredByOtherItems->Length(); - $databaseConnection = $this->getDatabaseConnection(); - $quotedItemFieldName = $databaseConnection->quoteIdentifier($this->sItemFieldName); - $oObj->AddFilterString("" `shop_article_stock`.$quotedItemFieldName > 0""); - $iWithStockCount = $oObj->Length(); - $aOptions[0] = $iCount - $iWithStockCount; - $aOptions[1] = $iWithStockCount; - }" -TPkgShopListfilterItemIsOnStock,"* return option as assoc array (name=>count). - * - * @return array","public function GetQueryRestrictionForActiveFilter() - { - $sQuery = ''; - $sValue = $this->GetActiveValue(); - if ('1' == $sValue) { - $sQuery = '`shop_article_stock`.`'.MySqlLegacySupport::getInstance()->real_escape_string($this->sItemFieldName).'` > 0'; - }" -TPkgShopListfilterItemIsReduced,"* you need to set this to the field name you want to filter by. - * - * @var string","public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - $aOptions = $this->oItemListFilteredByOtherItems->GetItemUniqueValueListForField('id', array($this, 'ArticleIsReduced')); - $this->OrderOptions($aOptions); - $this->SetInternalCache('aOptions', $aOptions); - }" -TPkgShopListfilterItemIsReduced,"* return option as assoc array (name=>count). - * - * @return array","public function ArticleIsReduced($sFieldName, $sValue, $aRow) - { - if ($aRow['price_reference'] > $aRow['price']) { - return '1'; - }" -TPkgShopListfilterItemIsReduced,"* @param string $sFieldName - * @param string $sValue - * @param array $aRow - * @return string - * - * @psalm-return '0'|'1'","public function GetQueryRestrictionForActiveFilter() - { - $sQuery = ''; - $sValue = $this->GetActiveValue(); - if ('1' == $sValue) { - $sQuery = '`shop_article`.`price_reference` > 0 AND `shop_article`.`price_reference` != `shop_article`.`price` '; - }" -TPkgShopListfilterItemLevelTree,"* you need to set this to the table name of the connected table. - * - * @var string","public function GetRenderedCategoryTree() - { - $aFilterCategories = $this->GetOptions(); - $oTree = TShopCategoryTree::GetCategoryTree(); - $oTree->ResetCounter(); - foreach ($aFilterCategories as $sCategoryId => $sCategoryCount) { - $oTree->AddItemCount($sCategoryId, $sCategoryCount); - }" -TPkgShopListfilterItemManufacturer,"* you need to set this to the table name of the connected table. - * - * @var string","public function GetQueryRestrictionForActiveFilter() - { - $sQuery = parent::GetQueryRestrictionForActiveFilter(); - - if (is_null($sQuery)) { - $aValues = $this->aActiveFilterData; - if (is_array($aValues) && count($aValues) > 0) { - $quotedItemFieldName = $this->getDatabaseConnection()->quoteIdentifier($this->sItemFieldName); - $sQuery = "" `shop_article`.$quotedItemFieldName = '' ""; - }" -TPkgShopListfilterItemManufacturer,"* you need to set this to the field name in the article table (note: the field is not derived from - * the table name since this may differ). - * - * @var string","public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - $aOptions = array(); - //select shop_manufacturer_id, that has available(searchable, invirtual, active, etc) articles of filtered categories - $sIdSelect = $this->GetResultSetBaseQuery(); - - //select id of available(searchable, invirtual, active, etc) articles of filtered categories - $sArticleIdsQuery = $this->GetResultSetBaseQuery('id'); - $databaseConnection = $this->getDatabaseConnection(); - $quotedItemTableName = $databaseConnection->quoteIdentifier($this->sItemTableName); - $quotedItemFieldName = $databaseConnection->quoteIdentifier($this->sItemFieldName); - $quotedTargetTableNameField = $databaseConnection->quoteIdentifier($this->GetTargetTableNameField()); - if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { - $sItemQuery = "" - SELECT itemtable.$quotedTargetTableNameField AS attribute, COUNT(itemtable.$quotedTargetTableNameField) AS matches - FROM $quotedItemTableName AS itemtable - INNER JOIN `shop_article` ON `shop_article`.$quotedItemFieldName = itemtable.`id` - INNER JOIN ($sIdSelect) AS Z ON itemtable.`id` = Z.$quotedItemFieldName - INNER JOIN ($sArticleIdsQuery) AS Y ON `shop_article`.`id` = Y.`id` - GROUP BY itemtable.$quotedTargetTableNameField - ORDER BY itemtable.$quotedTargetTableNameField - ""; - }" -TPkgShopListfilterItemMultiselect,"* you need to set this to the table name of the connected table. - * - * @var string","public function IsSelected($sItemName) - { - $bIsSelected = false; - if (is_array($this->aActiveFilterData)) { - $bIsSelected = in_array($sItemName, $this->aActiveFilterData); - }" -TPkgShopListfilterItemMultiselect,"* you need to set this to the field name in the article table (note: the field is not derived from - * the table name since this may differ). - * - * @var string","public function IsActiveFilter() - { - $bIsSelected = false; - if (is_array($this->aActiveFilterData)) { - $bIsSelected = true; - }" -TPkgShopListfilterItemMultiselect,"* return true if the item is selected. - * - * @param string $sItemName - * - * @return bool","public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - $aOptions = array(); - $sIdSelect = $this->GetResultSetBaseQuery(); - $databaseConnection = $this->getDatabaseConnection(); - $quotedItemTableName = $databaseConnection->quoteIdentifier($this->sItemTableName); - $quotedItemFieldName = $databaseConnection->quoteIdentifier($this->sItemFieldName); - $quotedTargetTableNameField = $databaseConnection->quoteIdentifier($this->GetTargetTableNameField()); - if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { - $sItemQuery = "" - SELECT itemtable.$quotedTargetTableNameField AS attribute, COUNT(itemtable.$quotedTargetTableNameField) AS matches - FROM $quotedItemTableName AS itemtable - INNER JOIN `shop_article` ON `shop_article`.$quotedItemFieldName = itemtable.`id` - INNER JOIN ($sIdSelect) AS Z ON itemtable.`id` = Z.$quotedItemFieldName - GROUP BY itemtable.$quotedTargetTableNameField - ""; - }" -TPkgShopListfilterItemMultiselect,"* return true if a item is selected. - * - * @return bool","public function GetQueryRestrictionForActiveFilter() - { - /** @var string|null $sQuery */ - $sQuery = $this->GetFromInternalCache('sQueryRestrictionForActiveFilter'); - - if (is_null($sQuery)) { - $aValues = $this->aActiveFilterData; - if (is_array($aValues) && count($aValues) > 0) { - $aValues = TTools::MysqlRealEscapeArray($aValues); - $sItemListQuery = 'SELECT * FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($this->sItemTableName).'` WHERE '.$this->GetTargetTableNameField()."" IN ('"".implode(""','"", $aValues).""')""; - $tRes = MySqlLegacySupport::getInstance()->query($sItemListQuery); - $aIdList = array(); - while ($aItemRow = MySqlLegacySupport::getInstance()->fetch_assoc($tRes)) { - $aIdList[] = MySqlLegacySupport::getInstance()->real_escape_string($aItemRow['id']); - }" -TPkgShopListfilterItemMultiselect,"* return option as assoc array (name=>count). - * - * @return array","public function GetActiveSettingAsHiddenInputField() - { - $sHTML = ''; - if (is_array($this->aActiveFilterData)) { - reset($this->aActiveFilterData); - foreach ($this->aActiveFilterData as $sItemName) { - $sHTML .= 'GetURLInputName()).'[]"" value=""'.TGlobal::OutHTML($sItemName).'"" />'; - }" -TPkgShopListfilterItemMultiselectMLT,"* return the query restriction for active filter. returns false if there - * is no active restriction for this item. - * - * @return string|null","public function GetQueryRestrictionForActiveFilter() - { - /** @var string|null $sQuery */ - $sQuery = $this->GetFromInternalCache('sQueryRestrictionForActiveFilter'); - - if (is_null($sQuery)) { - if (true === is_array($this->aActiveFilterData) && count($this->aActiveFilterData) > 0) { - $sItemListQuery = $this->GetSQLQueryForQueryRestrictionForActiveFilter(); - $aIdList = array(); - if (!empty($sItemListQuery)) { - $tRes = MySqlLegacySupport::getInstance()->query($sItemListQuery); - $aIdList = array(); - while ($aItemRow = MySqlLegacySupport::getInstance()->fetch_assoc($tRes)) { - $aIdList[] = MySqlLegacySupport::getInstance()->real_escape_string($aItemRow['source_id']); - }" -TPkgShopListfilterItemMultiselectMLT,@var string|null $sQuery,"public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - $aOptions = array(); - $sIdSelect = $this->GetResultSetBaseQuery(); - $databaseConnection = $this->getDatabaseConnection(); - $quotedItemTableName = $databaseConnection->quoteIdentifier($this->sItemTableName); - $quotedTableName = $databaseConnection->quoteIdentifier(""shop_article_{$this->sItemFieldName}" -TPkgShopListfilterItemMultiselectPropertyTable,"* return option as assoc array (name=>count). - * - * @return array","public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - if (!empty($this->fieldMysqlFieldName)) { - $this->sItemTableName = $this->fieldMysqlFieldName; - }" -TPkgShopListfilterItemNumeric,"* return active start value. - * - * @return float|false","public function GetActiveStartValue() - { - $sStartValue = false; - if (is_array($this->aActiveFilterData) && array_key_exists( - self::URL_PARAMETER_FILTER_START_VALUE, - $this->aActiveFilterData - ) - ) { - $sStartValue = $this->aActiveFilterData[self::URL_PARAMETER_FILTER_START_VALUE]; - }" -TPkgShopListfilterItemNumeric,"* return active end value. - * - * @return float|false","public function GetActiveEndValue() - { - $sEndValue = false; - if (is_array($this->aActiveFilterData) && array_key_exists( - self::URL_PARAMETER_FILTER_END_VALUE, - $this->aActiveFilterData - ) - ) { - $sEndValue = $this->aActiveFilterData[self::URL_PARAMETER_FILTER_END_VALUE]; - }" -TPkgShopListfilterItemNumeric,"* return setting of element as hidden input fields. - * - * @return string","public function GetActiveSettingAsHiddenInputField() - { - $sInput = ''; - if (false !== $this->GetActiveStartValue()) { - $sInput .= 'GetURLInputName().'['.self::URL_PARAMETER_FILTER_START_VALUE.']' - ).'"" value=""'.TGlobal::OutHTML($this->GetActiveStartValue()).'"" />'; - }" -TPkgShopListfilterItemNumeric,"* return the query restriction for active filter. returns false if there - * is no active restriction for this item. - * - * @return string","public function GetQueryRestrictionForActiveFilter() - { - $sQuery = ''; - $dStartValue = $this->GetActiveStartValue(); - $dEndValue = $this->GetActiveEndValue(); - if ($dStartValue > 0 && $dEndValue > 0) { - $sQuery = ""`shop_article`.`{$this->sItemFieldName}" -TPkgShopListfilterItemPriceSlider,"* return option as assoc array (name=>count). - * - * @return array","public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - $aOptions = array(); - - // we only care for the max and min value... - $sIdSelect = $this->GetResultSetBaseQuery(); - - $query = ""SELECT MAX(`price`) AS maxprice, MIN(`price`) AS minprice - FROM `shop_article` - INNER JOIN ({$sIdSelect}" -TPkgShopListfilterItemShopAttributeList,"* possible filter config defines. - * - * PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM -> set to true if you want a count per filter option - * - * PKG_SHOP_LISTFILTER_ATTRIBUTE_FILTER_SELECT_VARIANTS -> set to true if you want the filter to include variants - * - * PKG_SHOP_LISTFILTER_ATTRIBUTE_FILTER_SELECT_VARIANTS_PARENTS -> set to true if you want to include variants and - * show only parent articles in list. If false you have to show variants in article list. - * - * /*","public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - $aOptions = array(); - $oShopAttribute = $this->GetFieldShopAttribute(); - if (is_object($oShopAttribute)) { - $sIdSelect = $this->GetResultSetBaseQuery(); - // now add the filter from the filter module... - $query = 'CREATE TEMPORARY TABLE `_tmp_category_article` ( - `id` CHAR( 36 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL - ) ENGINE = MEMORY'; - MySqlLegacySupport::getInstance()->query($query); - $query = ""INSERT INTO _tmp_category_article (`id`) {$sIdSelect}" -TPkgShopListfilterItemShopAttributeList,"* you need to set this to the table name of the connected table. - * - * @var string","public function GetQueryRestrictionForActiveFilter() - { - /** @var string|null $sQuery */ - $sQuery = $this->GetFromInternalCache('sQueryRestrictionForActiveFilter'); - - if (null === $sQuery) { - $databaseConnection = $this->getDatabaseConnection(); - $aValues = $this->aActiveFilterData; - if (is_array($aValues) && count($aValues) > 0) { - $sItemListQuery = $this->GetSQLQueryForQueryRestrictionForActiveFilter(); - $aIdList = array(); - if (!empty($sItemListQuery)) { - $tRes = MySqlLegacySupport::getInstance()->query($sItemListQuery); - $aIdList = array(); - while ($aItemRow = MySqlLegacySupport::getInstance()->fetch_assoc($tRes)) { - $aIdList[] = $databaseConnection->quote($aItemRow['source_id']); - }" -TPkgShopListfilterItemShopAttributeNumeric,"* you need to set this to the table name of the connected table. - * - * @var string","public function GetActiveStartValue() - { - $sStartValue = false; - if (is_array($this->aActiveFilterData) && array_key_exists(self::URL_PARAMETER_FILTER_START_VALUE, $this->aActiveFilterData)) { - $sStartValue = $this->aActiveFilterData[self::URL_PARAMETER_FILTER_START_VALUE]; - }" -TPkgShopListfilterItemShopAttributeNumeric,"* you need to set this to the field name in the article table (note: the field is not derived from - * the table name since this may differ). - * - * @var string","public function GetActiveEndValue() - { - $sEndValue = false; - if (is_array($this->aActiveFilterData) && array_key_exists(self::URL_PARAMETER_FILTER_END_VALUE, $this->aActiveFilterData)) { - $sEndValue = $this->aActiveFilterData[self::URL_PARAMETER_FILTER_END_VALUE]; - }" -TPkgShopListfilterItemShopAttributeNumeric,"* return active start value. - * - * @return float|false","public function GetMinValue() - { - return $this->fieldMinValue; - }" -TPkgShopListfilterItemShopAttributeNumeric,"* return active end value. - * - * @return float|false","public function GetMaxValue() - { - return $this->fieldMaxValue; - }" -used,"* base class used to select from a specific variant type. -/*","public function GetItemName($sFieldName, $sFieldValue, $aRow) - { - /** @var array $aLookupList */ - static $aLookupList = array(); - - if (!array_key_exists($aRow['id'], $aLookupList)) { - $aLookupList[$aRow['id']] = array(); - $oVariantType = $this->GetVariantType($aRow); - if ($oVariantType) { - $oArticle = TdbShopArticle::GetNewInstance(); - $oArticle->LoadFromRow($aRow); - - /** @var string[] $aResult */ - $aResult = array(); - $oVariantValues = $oArticle->GetVariantValuesAvailableForType($oVariantType); - if ($oVariantValues) { - while ($oVariantValue = $oVariantValues->Next()) { - if (!empty($oVariantValue->fieldNameGrouped)) { - $aResult[] = $oVariantValue->fieldNameGrouped; - }" -used,"* you need to set this to the table name of the connected table. - * - * @var string","public function GetQueryRestrictionForActiveFilter() - { - /** @var string|null $sQuery */ - $sQuery = $this->GetFromInternalCache('sQueryRestrictionForActiveFilter'); - - if (is_null($sQuery)) { - $aValues = $this->aActiveFilterData; - if (!is_array($aValues)) { - if (empty($aValues)) { - $aValues = array(); - }" -used,"* you need to set this to the field name in the article table (note: the field is not derived from - * the table name since this may differ). - * - * @var string","public function GetOptions() - { - $aOptions = $this->GetFromInternalCache('aOptions'); - if (is_null($aOptions)) { - $aOptions = array(); - $sIdSelect = $this->GetResultSetBaseQuery(); - - $databaseConnection = $this->getDatabaseConnection(); - $quotedTargetTableNameField = $databaseConnection->quoteIdentifier($this->GetTargetTableNameField()); - - if (PKG_SHOP_LISTFILTER_ENABLE_COUNT_PER_FILTER_ITEM) { - $sItemQuery = ""SELECT `shop_variant_type_value`.{$quotedTargetTableNameField}" -used,* @var string,"public function getVariantTypeIds() - { - $aId = array(); - $query = ""SELECT `id` FROM shop_variant_type WHERE `identifier` = '{$this->sVariantTypeIdentifier}" -used,"* base class used to select from a specific variant type. -/*","public function GetAddFilterURL($sValue) - { - $oActiveListfilter = TdbPkgShopListfilter::GetActiveInstance(); - $aURLData = $oActiveListfilter->GetCurrentFilterAsArray(); - if (false == $this->fieldAllowMultiSelection || '' == $sValue) { - if ($this->IsSelected($sValue)) { - unset($aURLData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA][$this->id]); - }" -TCMSTableEditor_PkgShopListfilterItem,* @property TdbPkgShopListfilterItem $oTable,"public function ProcessFieldsBeforeDisplay($oFields) - { - parent::ProcessFieldsBeforeDisplay($oFields); - $this->RemoveDisabledFields($oFields); - }" -MTPkgShopListfilterCore,* @var FilterApiInterface,"public function __construct() - { - parent::__construct(); - $this->filterApi = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_shop_list_filter.filter_api'); - }" -MTPkgShopListfilterCore,"* if this function returns true, then the result of the execute function will be cached. - * - * @return bool","public function Init() - { - parent::Init(); - //we need to call this here because function could be load static filter (configured in module config) data to post data - TdbPkgShopListfilter::GetActiveInstance(); - }" -MTPkgShopListfilterCore,"* return an assoc array of parameters that describe the state of the module. - * - * @return array","public function Execute() - { - parent::Execute(); - $this->data['oFilter'] = TdbPkgShopListfilter::GetActiveInstance(); - - return $this->data; - }" -MTPkgShopListfilterCore,"* if the content that is to be cached comes from the database (as ist most often the case) - * then this function should return an array of assoc arrays that point to the - * tables and records that are associated with the content. one table entry has - * two fields: - * - table - the name of the table - * - id - the record in question. if this is empty, then any record change in that - * table will result in a cache clear. - * - * @return array","public function _AllowCache() - { - return $this->filterApi->allowCache(); - }" -MTPkgShopListfilterCore,* @return string[],"public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - $listState = $this->filterApi->getCacheParameter(); - $listState['is_filter_module'] = true; - - return array_merge_recursive($parameters, $listState); - }" -ResultModification,"* @param ResultInterface $result - * @param array $configuration - * @param int $filterDepth - * - * @return ResultInterface","public function apply(ResultInterface $result, array $configuration, $filterDepth) - { - if (false === $this->listAllowsUseOfPostSearchFilter($configuration, $filterDepth)) { - return $result; - }" -ResultModification,"* @return bool - * - * @param int $filterDepth","public function applyState(ResultInterface $result, array $configuration, StateInterface $state) - { - return $result; - }" -StateRequestExtractor,* {@inheritDoc},"public function extract(array $configuration, array $requestData, $listSpotName) - { - if (false === $this->postSearchFilterEnabled($configuration)) { - return array(); // no need to add state data - }" -TPkgShopListfilter_TShopCategory,"* returns the ID of the Listfilter for that is set for this category or one of its ancestors. - * - * @return string","public function GetFieldPkgShopListfilterIdRecursive() - { - /** @var string|null $sFilterId */ - $sFilterId = $this->GetFromInternalCache('sActingFilterForCategory'); - if (null !== $sFilterId) { - return $sFilterId; - }" -TPkgShopListfilter_TShopModuleArticleListFilter,* @var bool,"public function GetListQuery($oListConfig) - { - $this->bCanBeFiltered = $oListConfig->fieldCanBeFiltered; - - return parent::GetListQuery($oListConfig); - }" -Select,@var bool,"public function setDisabled($disabled) - { - $this->disabled = $disabled; - - return $this; - }" -Select,@var int[],"public function getDisabled() - { - return $this->disabled; - }" -Select,@var int,"public function setSelectedOption($selectedOption) - { - $this->selectedOption = $selectedOption; - - return $this; - }" -Select,"* @param bool $disabled - * - * @return Select","public function getSelectedOption() - { - return $this->selectedOption; - }" -Select,* @return bool,"public function setOptions($options) - { - $this->options = $options; - - return $this; - }" -Select,"* @param int $selectedOption - * - * @return Select","public function addOption($option) - { - $this->options[] = $option; - - return $this; - }" -Select,* @return int,"public function getOptions() - { - return $this->options; - }" -Slider,"* @var string - * @psalm-var 'true'|'false' - * String representation of the disabled state.","public function setDisabled($disabled) - { - // slider need that as string - $this->disabled = ($disabled) ? 'true' : 'false'; - - return $this; - }" -Slider,@var int,"public function getDisabled() - { - return $this->disabled; - }" -Slider,@var int,"public function setMax($max) - { - $this->max = $max; - - return $this; - }" -Slider,@var int,"public function getMax() - { - return $this->max; - }" -Slider,@var int,"public function setMin($min) - { - $this->min = $min; - - return $this; - }" -Slider,@var int,"public function getMin() - { - return $this->min; - }" -Slider,"* @param bool $disabled - * - * @return Slider","public function setStep($step) - { - $this->step = $step; - - return $this; - }" -Slider,"* @return string - * @psalm-return 'true'|'false'","public function getStep() - { - return $this->step; - }" -Slider,"* @param int $max - * - * @return Slider","public function setValueHigh($valueHigh) - { - $this->valueHigh = $valueHigh; - - return $this; - }" -Slider,* @return int,"public function getValueHigh() - { - return $this->valueHigh; - }" -Slider,"* @param int $min - * - * @return Slider","public function setValueLow($valueLow) - { - $this->valueLow = $valueLow; - - return $this; - }" -Slider,* @return int,"public function getValueLow() - { - return $this->valueLow; - }" -TPkgShopNewsletterSignupWithOrder_TShopOrder,"* method can be used to modify the data saved to order before the save is executed. - * - * @param TShopBasket $oBasket - * @param array $aOrderData - * - * @return void","public function CreateOrderInDatabaseCompleteHook() - { - // ------------------------------------------------------------------------ - if ($this->fieldNewsletterSignup && false == $this->fieldCanceled) { - $sMail = $this->fieldUserEmail; - $sUserId = $this->fieldDataExtranetUserId; - // now signup user - - $oNewsletter = null; - if (!empty($sUserId)) { - // try to load by id - $oNewsletter = TdbPkgNewsletterUser::GetNewInstance(); - if (false == $oNewsletter->LoadFromField('data_extranet_user_id', $sUserId)) { - $oNewsletter = null; - }" -TPkgShopNewsletterSignupWithOrder_TShopBasket,* @var bool,"public function getUserSelectedNewsletterOptionInOrderStep() - { - return $this->userSelectedNewsletterOptionInOrderStep; - }" -TPkgShopNewsletterSignupWithOrder_TShopBasket,* @return bool,"public function setUserSelectedNewsletterOptionInOrderStep($userSelectedNewsletterOptionInOrderStep) - { - $this->userSelectedNewsletterOptionInOrderStep = $userSelectedNewsletterOptionInOrderStep; - }" -ChameleonSystemShopOrderStatusExtension,* @return void,"public function load(array $config, ContainerBuilder $container) - { - $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - }" -ChameleonSystemShopOrderStatusExtension,"* {@inheritdoc} - * - * @return void","public function prepend(ContainerBuilder $container) - { - $container->prependExtensionConfig('monolog', ['channels' => ['order_status']]); - }" -TPkgShopOrderStatusException_OrderStatusCodeNotFound,* @var string|null,"public function setShopId($shopId) - { - $this->shopId = $shopId; - - return $this; - }" -TPkgShopOrderStatusException_OrderStatusCodeNotFound,* @var string|null,"public function getShopId() - { - return $this->shopId; - }" -TPkgShopOrderStatusException_OrderStatusCodeNotFound,"* @param string|null $shopId - * - * @return $this","public function setStatusCode($statusCode) - { - $this->statusCode = $statusCode; - - return $this; - }" -TPkgShopOrderStatusException_OrderStatusCodeNotFound,* @return string|null,"public function getStatusCode() - { - return $this->statusCode; - }" -TPkgShopOrderStatusException_OrderStatusCodeNotFound,"* @param string|null $statusCode - * - * @return $this","public function __toString(): string - { - $sString = parent::__toString(); - $sString = $sString.""\n: Status Code "".$this->getStatusCode(); - $sString = $sString.' in shop '.$this->getShopId(); - - return $sString; - }" -TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,* @var TPkgCmsException[],"public function setOrderStatus($orderStatus) - { - $this->orderStatus = $orderStatus; - - return $this; - }" -TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,* @var TdbShopOrderStatus,"public function getOrderStatus() - { - return $this->orderStatus; - }" -TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,"* @param TdbShopOrderStatus $orderStatus - * - * @return $this","public function setExceptionList($exceptionList) - { - $this->exceptionList = $exceptionList; - - return $this; - }" -TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,* @return TdbShopOrderStatus,"public function getExceptionList() - { - return $this->exceptionList; - }" -TPkgShopOrderStatusException_PostOrderStatusAddedExceptions,"* @param TPkgCmsException[] $exceptionList - * - * @return $this","public function __toString(): string - { - $sString = parent::__toString(); - $sString = $sString.""\n: Status Entry "".$this->getOrderStatus()->sqlData; - - $sString .= ""\nExceptionList: ""; - foreach ($this->getExceptionList() as $exception) { - $sString .= ""\n"".$exception; - }" -,"* interface IPkgShopOrderStatusData. - * - * any item that abstracts a TdbObject needs to implement this - * the idea is, to remove the business logic from the TdbObjects - and abstract the data needed for that away from Tdb as well. Tdb is then only used as - * storage. This interface defines how the data is mapped between the two","public function getDataAsTdbArray(); -}" -TPkgShopOrderStatusMapper_Status,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oObject', 'TdbShopOrderStatus|TdbShopOrder', null, true); - $oRequirements->NeedsSourceObject('local', 'TdbCmsLocals', TdbCmsLocals::GetActive(), true); - }" -TPkgShopOrderStatusMapper_Status,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapperVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - /** @var TdbCmsLocals $local */ - $local = $oVisitor->GetSourceObject('local'); - - /** @var TdbShopOrderStatus|TdbShopOrder $oStatus */ - $oObject = $oVisitor->GetSourceObject('oObject'); - - if (null === $oObject) { - return; - }" -TPkgShopOrderStatusManagerEndPoint,"* @var IPkgCmsCoreLog - * - * @deprecated since 6.3.0","public function setLogger(IPkgCmsCoreLog $logger) - { - $this->logger = $logger; - }" -TPkgShopOrderStatusManagerEndPoint,"* @param IPkgCmsCoreLog $logger - * - * @deprecated since 6.3.0 - is not supported anymore; use only getShopLogger() or do your own logging - * - * @return void","public function addStatus(TPkgShopOrderStatusData $oData) - { - $this->getShopLogger()->info('add status', array('oData' => $oData)); - $this->validateStatusData($oData); - $this->getShopLogger()->info('status validated ok'); - $aData = $oData->getDataAsTdbArray(); - $oStatus = TdbShopOrderStatus::GetNewInstance($aData); - $oStatus->AllowEditByAll(true); - $oStatus->SaveFieldsFast($aData); - $oStatus->AllowEditByAll(false); - $this->getShopLogger()->info('status saved'); - - $aItems = $oData->getItems(); - $itemCount = count($aItems); - $count = 0; - /** @var TPkgShopOrderStatusItemData $item */ - foreach ($aItems as $item) { - ++$count; - $this->getShopLogger()->info(""process status {$count}" -TPkgShopOrderStatusManagerEndPoint,"* @return IPkgCmsCoreLog - * - * @deprecated since 6.3.0 - use getShopLogger() instead","public function sendStatusMailToCustomer(TdbShopOrderStatus $oStatus) - { - $this->getShopLogger()->info('start sendStatusMailToCustomer'); - $statusCode = $oStatus->GetFieldShopOrderStatusCode(); - - if (null !== $statusCode && false === $statusCode->fieldSendMailNotification) { - $this->getShopLogger()->info('no mail needed'); - - return true; - }" -TPkgShopOrderStatusDataEndPoint,* @var TdbShopOrder,"public function __construct(TdbShopOrder $order, $shopOrderStatusCode, $iStatusTimestamp, $info = null) - { - $this - ->setOrder($order) - ->setStatusTimestamp($iStatusTimestamp) - ->setShopOrderStatusCode($shopOrderStatusCode) - ->setInfo($info); - }" -TPkgShopOrderStatusDataEndPoint,* @var string,"public function setInfo($info) - { - $this->info = $info; - - return $this; - }" -TPkgShopOrderStatusDataEndPoint,* @var TdbShopOrderStatusCode,"public function setOrder($shopOrder) - { - $this->order = $shopOrder; - - return $this; - }" -TPkgShopOrderStatusDataEndPoint,* @var int,"public function setShopOrderStatusCode($shopOrderStatusCode) - { - $this->shopOrderStatusCode = $shopOrderStatusCode; - - return $this; - }" -TPkgShopOrderStatusDataEndPoint,* @var string|null,"public function setStatusTimestamp($statusTimestamp) - { - $this->statusTimestamp = $statusTimestamp; - - return $this; - }" -TPkgShopOrderStatusDataEndPoint,* @var TPkgShopOrderStatusItemData[],"public function addItem(TPkgShopOrderStatusItemData $item) - { - $this->items[] = $item; - - return $this; - }" -TPkgShopOrderStatusDataEndPoint,@var null | \Symfony\Component\HttpFoundation\ParameterBag,"public function getInfo() - { - return $this->info; - }" -TPkgShopOrderStatusDataEndPoint,"* @param TdbShopOrder $order - * @param string $shopOrderStatusCode - system_name of shop_order_status_code - * @param int $iStatusTimestamp - * @param string|null $info","public function getOrder() - { - return $this->order; - }" -TPkgShopOrderStatusDataEndPoint,"* @param string|null $info - * - * @return $this","public function getShopOrderStatusCode() - { - return $this->shopOrderStatusCode; - }" -TPkgShopOrderStatusDataEndPoint,"* @param \TdbShopOrder $shopOrder - * - * @return $this","public function getStatusTimestamp() - { - return $this->statusTimestamp; - }" -TPkgShopOrderStatusDataEndPoint,"* @param string $shopOrderStatusCode - * - * @return $this","public function getItems() - { - return $this->items; - }" -TPkgShopOrderStatusDataEndPoint,"* @param int $statusTimestamp - * - * @return $this","public function getShopOrderStatusCodeObject($bRefresh = false) - { - if (true === $bRefresh) { - $this->shopOrderStatusCodeObject = null; - }" -TPkgShopOrderStatusDataEndPoint,"* @param TPkgShopOrderStatusItemData $item - * - * @return $this","public function getStatusData() - { - return $this->statusData; - }" -TPkgShopOrderStatusDataEndPoint,* @return string|null,"public function setStatusData($statusData) - { - $this->statusData = $statusData; - - return $this; - }" -TPkgShopOrderStatusDataEndPoint,* @return \TdbShopOrder,"public function getDataAsTdbArray() - { - $data = (null === $this->getStatusData()) ? array() : $this->getStatusData()->all(); - $data = serialize($data); - - return array( - 'shop_order_id' => $this->getOrder()->id, - 'shop_order_status_code_id' => $this->getShopOrderStatusCodeObject()->id, - 'status_date' => date('Y-m-d H:i:s', $this->getStatusTimestamp()), - 'info' => $this->getInfo(), - 'data' => $data, - ); - }" -TPkgShopOrderStatusItemDataEndPoint,* @var string,"public function __construct($shopOrderItemId, $amount) - { - $this->setShopOrderItemId($shopOrderItemId)->setAmount($amount); - }" -TPkgShopOrderStatusItemDataEndPoint,* @var int,"public function getShopOrderItemId() - { - return $this->shopOrderItemId; - }" -TPkgShopOrderStatusItemDataEndPoint,"* @param string $shopOrderItemId - * @param int $amount","public function getAmount() - { - return $this->amount; - }" -TPkgShopOrderStatusItemDataEndPoint,* @return string,"public function setAmount($amount) - { - $this->amount = $amount; - - return $this; - }" -TPkgShopOrderStatusItemDataEndPoint,* @return int,"public function setShopOrderItemId($shopOrderItemId) - { - $this->shopOrderItemId = $shopOrderItemId; - - return $this; - }" -TPkgShopOrderStatusItemDataEndPoint,"* @param int $amount - * - * @return $this","public function getDataAsTdbArray() - { - return array( - 'shop_order_status_id' => '', - 'shop_order_item_id' => $this->getShopOrderItemId(), - 'amount' => $this->getAmount(), - ); - }" -TPkgRunFrontendAction_SendOrderStatusEMail,"* @param array $aParameter - * - * @return TPkgRunFrontendActionStatus|TdbShopOrderStatus - * - * @psalm-suppress UndefinedPropertyAssignment - * @FIXME Properties `sMessage` and `sMessageType` do not exist on `TdbShopOrderStatus`","public function runAction($aParameter) - { - $oStatus = new TPkgRunFrontendActionStatus(); - if (isset($aParameter['order_status_id']) && isset($aParameter['order_id']) && !empty($aParameter['order_status_id']) && !empty($aParameter['order_id'])) { - $oStatus = TdbShopOrderStatus::GetNewInstance(); - if ($oStatus->LoadFromFields( - array('shop_order_id' => $aParameter['order_id'], 'id' => $aParameter['order_status_id']) - ) - ) { - $oStatusManager = new TPkgShopOrderStatusManager(); - $bSuccess = $oStatusManager->sendStatusMailToCustomer($oStatus); - if ($bSuccess) { - $oStatus->sMessage = TGlobal::Translate('chameleon_system_shop_order_status.msg.mail_success'); - $oStatus->sMessageType = 'MESSAGE'; - }" -TPkgShopBasketMapper_TelephoneOrder,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - }" -TPkgShopBasketMapper_TelephoneOrder,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $Step = TdbShopOrderStep::GetStep('user'); - $aLink = array('sLinkURL' => '#telephoneModal', 'sTitle' => TGlobal::Translate('chameleon_system_shop_order_via_phone.action.open_telefon_order_form')); - $oVisitor->SetMappedValue('aLink', $aLink); - }" -TPkgShopBasketMapper_TelephoneOrderForm,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - // Set per default - $oRequirements->NeedsSourceObject('oActiveUser', 'TdbDataExtranetUser', TdbDataExtranetUser::GetInstance()); - $oRequirements->NeedsSourceObject('oActivePage', 'TCMSActivePage', $this->getActivePageService()->getActivePage(), true); - $oRequirements->NeedsSourceObject('oGlobal', 'TGlobal', $oGlobal = TGlobal::instance()); - $oRequirements->NeedsSourceObject('oMessageManager', 'TCMSMessageManager', $oMessageManager = TCMSMessageManager::GetInstance()); - $oRequirements->NeedsSourceObject('oTextBlock', 'TdbPkgCmsTextBlock', TdbPkgCmsTextBlock::GetInstanceFromSystemName('telephone_order_info_text'), true); - $oRequirements->NeedsSourceObject('sName', 'string', 'phone'); - $oRequirements->NeedsSourceObject('sFunction', 'string', 'OrderViaPhone'); - $oRequirements->NeedsSourceObject('sCustomMSGConsumer', 'string', MTShopOrderWizardCore::ORDER_VIA_PHONE_MESSAGE_CONSUMER_NAME); - $oRequirements->NeedsSourceObject('sTelephoneURLParameter', 'string', MTShopOrderWizardCore::ORDER_VIA_PHONE_URL_PARAMETER); - - // Set manually - $oRequirements->NeedsSourceObject('sSpotName', 'string', ''); - $oRequirements->NeedsSourceObject('sTitle', 'string', '', true); - $oRequirements->NeedsSourceObject('sText', 'string', '', true); - }" -TPkgShopBasketMapper_TelephoneOrderForm,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $oVisitor->SetMappedValue('sSpotName', $oVisitor->GetSourceObject('sSpotName')); - $oVisitor->SetMappedValue('sTitle', $oVisitor->GetSourceObject('sTitle')); - $oVisitor->SetMappedValue('sText', $oVisitor->GetSourceObject('sText')); - $oVisitor->SetMappedValue('sName', $oVisitor->GetSourceObject('sName')); - $oVisitor->SetMappedValue('sFunction', $oVisitor->GetSourceObject('sFunction')); - - $oTextBlock = $oVisitor->GetSourceObject('oTextBlock'); - if (!is_null($oTextBlock)) { - $oVisitor->SetMappedValue('sRawInfoText', $oTextBlock->GetTextField('content')); - }" -MTPkgShopOrderViaPhone_MTShopOrderWizard,* @return void,"public function Init() - { - parent::Init(); - }" -ChameleonSystemShopPaymentIPNExtension,"* {@inheritdoc} - * - * @return void","public function load(array $configs, ContainerBuilder $container) - { - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - }" -AbstractPkgShopPaymentIPNException,"* @return string - * @psalm-return class-string","public function __toString(): string - { - $sString = parent::__toString(); - - $sString .= ""\ncalled in ["".$this->getFile().'] on line ['.$this->getLine().']'; - - return $sString; - }" -TPkgShopPaymentIPNException_OrderHasNoPaymentGroup,* @var string,"public function __construct( - $sOrderId, - $message = '', - $code = 0, - Exception $previous = null - ) { - $this->orderId = $sOrderId; - parent::__construct($message, $code, $previous); - }" -TPkgShopPaymentIPNException_OrderHasNoPaymentGroup,"* @param string $sOrderId - * @param string $message - * @param int $code - * @param Exception|null $previous","public function __toString(): string - { - $sString = parent::__toString(); - $sString = $sString.""\nOrder-ID: "".$this->getOrderId(); - - return $sString; - }" -TPkgShopPaymentIPNException_OrderHasNoPaymentGroup,* @return string,"public function getOrderId() - { - return $this->orderId; - }" -TPkgShopPaymentIPNException_InvalidIP,@var string,"public function __construct( - $sRequestIP, - TPkgShopPaymentIPNRequest $oRequest, - $message = '', - $code = 0, - Exception $previous = null - ) { - $this->requestIP = $sRequestIP; - parent::__construct($oRequest, $message, $code, $previous); - }" -TPkgShopPaymentIPNException_InvalidIP,"* @param string $sRequestIP - * @param TPkgShopPaymentIPNRequest $oRequest - * @param string $message - * @param int $code - * @param Exception|null $previous","public function __toString(): string - { - $sString = parent::__toString(); - $sString = $sString.""\nRequest IP: "".$this->getRequestIP(); - - return $sString; - }" -TPkgShopPaymentIPNException_InvalidIP,"* the header to return to the caller. - * - * @return string","public function getResponseHeader() - { - return 'HTTP/1.0 403.6 IP address rejected'; - }" -TPkgShopPaymentIPNException_InvalidIP,* @return string,"public function getRequestIP() - { - return $this->requestIP; - }" -TPkgShopPaymentIPNException_OrderNotFound,@var string|null,"public function __construct( - $iOrderCmsIdent, - TPkgShopPaymentIPNRequest $oRequest, - $message = '', - $code = 0, - Exception $previous = null - ) { - $this->orderCmsIdent = $iOrderCmsIdent; - parent::__construct($oRequest, $message, $code, $previous); - }" -TPkgShopPaymentIPNException_OrderNotFound,"* @param string|null $iOrderCmsIdent - * @param TPkgShopPaymentIPNRequest $oRequest - * @param string $message - * @param int $code - * @param Exception|null $previous","public function __toString(): string - { - $sString = parent::__toString(); - $sString = $sString.""\nOrderCmsIdent: "".$this->getOrderCmsIdent(); - - return $sString; - }" -TPkgShopPaymentIPNException_OrderNotFound,"* the header to return to the caller. - * - * @return string","public function getResponseHeader() - { - return 'HTTP/1.0 404 Not Found'; - }" -TPkgShopPaymentIPNException_OrderNotFound,* @return string|null,"public function getOrderCmsIdent() - { - return $this->orderCmsIdent; - }" -TPkgShopPaymentIPNException_RequestError,* @var TPkgShopPaymentIPNRequest|null,"public function __construct( - TPkgShopPaymentIPNRequest $oRequest, - $message = '', - $code = 0, - Exception $previous = null - ) { - $this->request = $oRequest; - parent::__construct($message, $code, $previous); - }" -TPkgShopPaymentIPNException_RequestError,"* @param TPkgShopPaymentIPNRequest $oRequest - * @param string $message - * @param int $code - * @param Exception $previous","public function __toString(): string - { - $sString = parent::__toString(); - - $sString = $sString.""\nRequestURL: "".$this->getRequest()->getRequestURL().""\nRequestData: "".print_r( - $this->getRequest()->getRequestPayload(), - true - ); - - return $sString; - }" -TPkgShopPaymentIPNException_RequestError,"* the header to return to the caller. - * - * @return string","public function getResponseHeader() - { - return 'HTTP/1.0 403.10 Invalid configuration'; - }" -TPkgShopPaymentIPNException_RequestError,* @return TPkgShopPaymentIPNRequest|null,"public function getRequest() - { - return $this->request; - }" -TPkgShopPaymentIPNException_SystemError,"* the header to return to the caller. - * - * @return string","public function getResponseHeader() - { - return 'HTTP/1.0 500 Internal Server Error '.$this->getErrorType(); - }" -,"* process the IPN request - the request object contains all details (payment handler, group, order etc) - * the call should return true if processing should continue, false if it is to stop. On Error it should throw an error - * extending AbstractPkgShopPaymentIPNHandlerException. - * - * @param TPkgShopPaymentIPNRequest $oRequest - * @trows AbstractPkgShopPaymentIPNHandlerException - * - * @return bool","public function handleIPN(TPkgShopPaymentIPNRequest $oRequest); - - /** - * return an instance of TPkgShopPaymentIPN_TransactionDetails if your IPN should trigger a transaction for the order - * (ie payment or refunds etc). if you return null, then no transaction will be triggered. - * - * @param TPkgShopPaymentIPNRequest $oRequest - * - * @return TPkgShopPaymentIPN_TransactionDetails|null - */ - public function getIPNTransactionDetails(TPkgShopPaymentIPNRequest $oRequest); -}" -TPkgShopPaymentIPNManager,"* @param TdbCmsPortal $portal - * @param TdbShopOrder $order - * - * @throws TPkgShopPaymentIPNException_OrderHasNoPaymentGroup - * - * @return string","public function getIPNURL(TdbCmsPortal $portal, TdbShopOrder $order) - { - $identifier = $this->getIPNIdentifierFromOrder($order); - if (null === $identifier) { - throw new TPkgShopPaymentIPNException_OrderHasNoPaymentGroup($order->id, 'failed to generate an IPN URL because the payment handler of the order is not assigned to any payment handler group'); - }" -TPkgShopPaymentIPNRequest,* @var string,"public function __construct($sURL, $aRequestPayload) - { - $this->requestURL = $sURL; - $this->requestPayload = $aRequestPayload; - }" -TPkgShopPaymentIPNRequest,* @var array,"public function isIPNRequest() - { - return false !== stripos($this->getRequestURL(), self::URL_IPN_IDENTIFIER); - }" -TPkgShopPaymentIPNRequest,* @var TdbShopPaymentHandlerGroup|null,"public function getIpnStatus() - { - if (null === $this->oStatus) { - $this->oStatus = $this->getPaymentHandlerGroup()->getIPNStatus($this); - }" -TPkgShopPaymentIPNRequest,* @var TdbShopOrder|null,"public function parseRequest(TdbPkgShopPaymentIpnMessage $oMessage) - { - if (false === $this->isIPNRequest()) { - throw new TPkgShopPaymentIPNException_RequestError($this, ""handleIPN called with an invalid URL (URL: {$this->getRequestURL( - )}" -TPkgShopPaymentIPNRequest,* @var TdbShopPaymentHandler|IPkgShopPaymentIPNHandler,"public function allowRequestFromIP($sRequestIP) - { - return $this->getPaymentHandlerGroup()->isValidIP($sRequestIP); - }" -TPkgShopPaymentIPNRequest,* @var TdbPkgShopPaymentIpnStatus,"public function getRequestURL() - { - return $this->requestURL; - }" -TPkgShopPaymentIPNRequest,"* @param string $sURL - * @param array $aRequestPayload","public function getRequestPayload() - { - return $this->requestPayload; - }" -TPkgShopPaymentIPNRequest,"* @param array $aRequestPayload - * @param null|string $sSourceCharset - * - * @return array","public function getPaymentHandlerGroup() - { - return $this->paymentHandlerGroup; - }" -TPkgShopPaymentIPNRequest,* @return bool,"public function getOrder() - { - return $this->order; - }" -TPkgShopPaymentIPNRequest,* @return TdbPkgShopPaymentIpnStatus|null,"public function getPaymentHandler() - { - return $this->paymentHandler; - }" -TPkgShopPaymentIpnMessage,"* @return true|string - response string if exists, `true` otherwise","public function replayIPN() - { - $oRequest = new TPkgShopPaymentIPNRequest($this->fieldRequestUrl, $this->fieldPayload); - $currentRequest = $this->getCurrentRequest(); - - $aData = array( - 'datecreated' => date('Y-m-d H:i:s'), - 'payload' => $this->fieldPayload, - 'success' => '0', - 'completed' => '0', - 'ip' => null === $currentRequest ? '' : $currentRequest->getClientIp(), - 'request_url' => $this->fieldRequestUrl, - 'cms_portal_id' => $this->fieldCmsPortalId, - 'shop_order_id', - ); - $oMessage = TdbPkgShopPaymentIpnMessage::GetNewInstance($aData); - $oMessage->Save(); - - try { - $oRequest->parseRequest($oMessage); - $oStatus = $oRequest->getIpnStatus(); - if (null === $oStatus) { - throw new TPkgShopPaymentIPNException_InvalidStatus($oRequest, 'IPN Request has no status or the status passed is not understood by the payment handler'); - }" -TPkgShopPaymentIpnTrigger,"* @param TdbPkgShopPaymentIpnMessageTrigger $oMessageTrigger - * - * @return void","public function runTrigger(TdbPkgShopPaymentIpnMessageTrigger $oMessageTrigger) - { - $oIpnMessage = $oMessageTrigger->GetFieldPkgShopPaymentIpnMessage(); - - $sURL = $this->fieldTargetUrl; - $aPayload = $oIpnMessage->fieldPayload; - - $oToHost = new TPkgCmsCoreSendToHost($sURL); - $oToHost - ->setPayload($aPayload) - ->setMethod(TPkgCmsCoreSendToHost::METHOD_POST); - - try { - $oToHost->executeRequest(); - if (200 !== $oToHost->getLastResponseCode()) { - throw new TPkgCmsException( - 'IPN invalid response header code ['.$oToHost->getLastResponseCode().'] (expected 200)' - ); - }" -TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,"* return true if the ip may send IPN to this payment type. - * - * @param string $sIP - * - * @return bool","public function isValidIP($sIP) - { - $bAllowed = false; - $sIPSource = trim($this->fieldIpnAllowedIps); - if ('' === $sIPSource) { - return true; - }" -TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,"* process the IPN request - the request object contains all details (payment handler, group, order etc) - * the call should return true if processing should continue, false if it is to stop. On Error it should throw an error - * extending AbstractPkgShopPaymentIPNHandlerException. - * - * @param TPkgShopPaymentIPNRequest $oRequest - * - * @trows AbstractPkgShopPaymentIPNHandlerException - * - * @return void","public function handleIPN(TPkgShopPaymentIPNRequest $oRequest) - { - $aHandlerChain = $this->getIPNHandlerChain(); - $this->handleIPNHook($oRequest); - foreach ($aHandlerChain as $sHandler) { - try { - /** @var $oHandler IPkgShopPaymentIPNHandler */ - $oHandler = new $sHandler(); - if (false === $oHandler->handleIPN($oRequest)) { - $this->handleTransactionHook($oHandler, $oRequest); - break; - }" -TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,@var $oHandler IPkgShopPaymentIPNHandler,"public function validateIPNRequestData(TPkgShopPaymentIPNRequest $oRequest) - { - return true; - }" -TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,"* extend this method if you want to do things for incoming ipn. - * - * @param TPkgShopPaymentIPNRequest $oRequest - * - * @return void","public function getOrderFromRequestData($aRequestData) - { - return null; - }" -TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,"* trigger transaction for the order based on the IPN. - * - * @param IPkgShopPaymentIPNHandler $oHandler - * @param TPkgShopPaymentIPNRequest $oRequest - * - * @return void","public function processRawRequestData($aRequestData) - { - return $aRequestData; - }" -TPkgShopPaymentIPN_TPkgShopPaymentHandlerGroup,"* return an array with names of payment handler (classes that implement IPkgShopPaymentIPNHandler). - * - * @return array","public function getIPNStatus(TPkgShopPaymentIPNRequest $oRequest) - { - return null; - }" -TPkgShopPaymentIPN_TCMSSmartURLHandler,* @return Request|null,"public function GetPageDef() - { - $oURLData = TCMSSmartURLData::GetActive(); - - $oGlobal = TGlobal::instance(); - $aRawData = $oGlobal->GetRawUserData(); - - $oRequest = new TPkgShopPaymentIPNRequest($oURLData->sRelativeURL, $aRawData); - - if (false === $oRequest->isIPNRequest()) { - return false; - }" -TPkgShopPaymentIPN_TCMSTableEditor_PkgShopPaymentIpnMessage,* adds table-specific buttons to the editor (add them directly to $this->oMenuItems).,"public function DefineInterface() - { - parent::DefineInterface(); - $this->methodCallAllowed[] = 'ReplayIPN'; - }" -TPkgShopPaymentIPN_TCMSTableEditor_PkgShopPaymentIpnMessage,* @return void,"public function ReplayIPN() - { - /** @var TdbPkgShopPaymentIpnMessage $oMsg */ - $oMsg = $this->oTable; - - return $oMsg->replayIPN(); - }" -TPkgShopPaymentIPN_TShopOrder,"* returns true if the status code has been sent as an IPN for the order. - * - * @param string $sStatusCode - * - * @return bool","public function hasIPNStatusCode($sStatusCode) - { - $oStatusCode = TdbPkgShopPaymentIpnMessage::getMessageForOrder($this, $sStatusCode); - $bHasStatusCode = (null !== $oStatusCode); - - return $bHasStatusCode; - }" -is,"* the class is used to transfer data from an IPN to a pkgShopPaymentTransaction - * Class TPkgShopPaymentIPN_TransactionDetails.","public function __construct($amount, $transactionType, $context, $sequenceNumber, $iTransactionTimestamp, $dBalance = null) - { - $this->amount = $amount; - $this->transactionType = $transactionType; - $this->context = $context; - $this->sequenceNumber = $sequenceNumber; - $this->transactionTimestamp = $iTransactionTimestamp; - $this->resultingBalance = $dBalance; - }" -is,@var float,"public function getAmount() - { - return $this->amount; - }" -is,"* @var string - * @psalm-var TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_*","public function getContext() - { - return $this->context; - }" -is,@var string,"public function getTransactionType() - { - return $this->transactionType; - }" -is,@var string,"public function getSequenceNumber() - { - return $this->sequenceNumber; - }" -is,@var int,"public function getTransactionTimestamp() - { - return $this->transactionTimestamp; - }" -is,@var float|null,"public function getResultingBalance() - { - return $this->resultingBalance; - }" -is,"@var array","public function setResultingBalance($resultingBalance) - { - $this->resultingBalance = $resultingBalance; - - return $this; - }" -is,"* @param float $amount - * @param string $transactionType - must be a valid type (one of TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_*) - * @param string $context - a string explaining what caused the transaction - * @param string $sequenceNumber - * @param int $iTransactionTimestamp - * @param float $dBalance - if the IPN sends you a balance (amount remaining after transaction) then you can pass it here - * - * @psalm-param TPkgShopPaymentTransactionManager::TRANSACTION_TYPE_* $transactionType","public function setAdditionalData($key, $value) - { - $this->additionalData[$key] = $value; - }" -is,* @return float,"public function getAdditionalData($key) - { - if (true === isset($this->additionalData[$key])) { - return $this->additionalData[$key]; - }" -ChameleonSystemShopPaymentTransactionExtension,"* {@inheritdoc} - * - * @return void","public function load(array $config, ContainerBuilder $container) - { - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - }" -,"* payment handler that implement this interface will route payment transactions through an instance of PaymentTransactionHandlerInterface. - * - * - * Interface PaymentHandlerWithTransactionSupportInterface","public function paymentTransactionHandlerFactory($portalId); - - /** - * return true if capture on shipment is active. - * - * @return bool - */ - public function isCaptureOnShipment(); -}" -,"* @param \IPkgShopOrderPaymentConfig $config - * - * @throws \InvalidArgumentException","public function __construct(\IPkgShopOrderPaymentConfig $config); - - /** - * if the request results in a payment (capture) and not just in an authorization for a later capture, then the method - * must create a transaction and return it. - * - * @param \TPkgShopPaymentTransactionManager $transactionManager - * @param \TdbShopOrder $order - * - * @return \TdbPkgShopPaymentTransaction|null - * - * @throws \TPkgCmsException_LogAndMessage - */ - public function captureOrder(\TPkgShopPaymentTransactionManager $transactionManager, \TdbShopOrder $order); - - /** - * on success a transaction is created and returned by the method. - * - * @param \TPkgShopPaymentTransactionManager $transactionManager - * @param \TdbShopOrder $order - * @param float $value - the value to capture (should be >0) - * @param array $orderItemList - assoc array [shop_order_item_id] = [quantity] - * @param string $invoiceNumber - 16 char id shown on the payment statement of the buy (usually the order number or the bill number). will be passed to AmazonPaymentGroupConfig::getSellerAuthorizationNote - * - * @return \TdbPkgShopPaymentTransaction - * - * @throws \TPkgCmsException_LogAndMessage - */ - public function captureShipment( - \TPkgShopPaymentTransactionManager $transactionManager, - \TdbShopOrder $order, - $value, - $invoiceNumber = null, - array $orderItemList = null - ); - - /** - * on success a transaction is created and returned by the method. - * - * @param \TPkgShopPaymentTransactionManager $transactionManager - * @param \TdbShopOrder $order - * @param float $value - the value to refund (should be >0) - * @param string $invoiceNumber - 16 char id shown on the payment statement of the buy (usually the order number or the bill number). will be passed to AmazonPaymentGroupConfig::getSellerAuthorizationNote - * @param string $sellerRefundNote - a reason for the refund - * @param array $orderItemList - assoc array [shop_order_item_id] = [quantity] - * - * @return \TdbPkgShopPaymentTransaction[] - * - * @throws \TPkgCmsException_LogAndMessage - */ - public function refund( - \TPkgShopPaymentTransactionManager $transactionManager, - \TdbShopOrder $order, - $value, - $invoiceNumber = null, - $sellerRefundNote = null, - array $orderItemList = null - ); - - /** - * cancel any pending transactions with the payment provider (if the api of the payment provider allows for that) (will NOT cancel the order in the shop itself). - * - * @param \TPkgShopPaymentTransactionManager $transactionManager - * @param \TdbShopOrder $order - * @param string $cancellationReason - * - * @throws \TPkgCmsException_LogAndMessage - * - * @return void - */ - public function cancelOrder( - \TPkgShopPaymentTransactionManager $transactionManager, - \TdbShopOrder $order, - $cancellationReason = null - ); -}" -,"* @param TdbShopOrder $order - * @param bool $isCaptureOnShipment - * - * @return array key = order item id, value = amount","public function getProductsCaptureOnOrderCreation(TdbShopOrder $order, $isCaptureOnShipment); - - /** - * @param TdbShopOrder $order - * @param bool $isCaptureOnShipment - * - * @return array key = order item id, value = amount - */ - public function getProductsCaptureOnShipping(TdbShopOrder $order, $isCaptureOnShipment); - - /** - * @param TdbShopOrderItem $orderedProduct - * - * @return bool - */ - public function allowProductCaptureOnShipment(TdbShopOrderItem $orderedProduct); -}" -TPkgShopPaymentTransactionMapper_CollectionFormForOrder,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('order', 'TdbShopOrder'); - $oRequirements->NeedsSourceObject('paymentType'); // must be one of TPkgShopPaymentTransactionData::TYPE_* - }" -TPkgShopPaymentTransactionMapper_CollectionFormForOrder,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapperVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager","public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - /** @var TdbShopOrder $order */ - $order = $oVisitor->GetSourceObject('order'); - - $sTransactionType = $oVisitor->GetSourceObject('paymentType'); - $sHeadline = ''; - switch ($sTransactionType) { - case TPkgShopPaymentTransactionData::TYPE_PAYMENT: - $sHeadline = TGlobal::Translate('chameleon_system_shop_payment_transaction.collection_form.headline_payment'); - break; - case TPkgShopPaymentTransactionData::TYPE_CREDIT: - case TPkgShopPaymentTransactionData::TYPE_PAYMENT_REVERSAL: - $sHeadline = TGlobal::Translate('chameleon_system_shop_payment_transaction.collection_form.headline_refund'); - break; - default: - $sHeadline = TGlobal::Translate('chameleon_system_shop_payment_transaction.error.invalid_transaction_type', array('%sTransactionType%' => $sTransactionType)); - break; - }" -TPkgShopPaymentTransactionContextEndPoint,* @var string,"public function __construct($sContext) - { - $this->context = $sContext; - $this->extranetUser = TdbDataExtranetUser::GetInstance(); - $request = $this->getCurrentRequest(); - $this->ip = null === $request ? '' : $request->getClientIp(); - }" -TPkgShopPaymentTransactionContextEndPoint,* @var TdbDataExtranetUser,"public function getContext() - { - return $this->context; - }" -TPkgShopPaymentTransactionContextEndPoint,* @var string|null,"public function getExtranetUser() - { - return $this->extranetUser; - }" -TPkgShopPaymentTransactionContextEndPoint,* @param string $sContext,"public function getIp() - { - return $this->ip; - }" -TPkgShopPaymentTransactionDataEndPoint,* @var TdbShopOrder,"public function __construct(TdbShopOrder $oOrder, $type) - { - $this->setOrder($oOrder) - ->setType($type); - }" -TPkgShopPaymentTransactionDataEndPoint,* @var float,"public function setOrder($order) - { - $this->order = $order; - - return $this; - }" -TPkgShopPaymentTransactionDataEndPoint,* @var string - one of self::TYPE_*,"public function setConfirmed($confirmed) - { - $this->confirmed = $confirmed; - - return $this; - }" -TPkgShopPaymentTransactionDataEndPoint,* @var TPkgShopPaymentTransactionContext,"public function setConfirmedTimestamp($confirmedTimestamp) - { - $this->confirmedTimestamp = $confirmedTimestamp; - - return $this; - }" -TPkgShopPaymentTransactionDataEndPoint,* @var bool,"public function setContext(TPkgShopPaymentTransactionContext $context) - { - $this->context = $context; - - return $this; - }" -TPkgShopPaymentTransactionDataEndPoint,* @var int,"public function addItem(TPkgShopPaymentTransactionItemData $item) - { - $this->items[] = $item; - - return $this; - }" -TPkgShopPaymentTransactionDataEndPoint,* @var int,"public function setSequenceNumber($sequenceNumber) - { - $this->sequenceNumber = $sequenceNumber; - - return $this; - }" -TPkgShopPaymentTransactionDataEndPoint,* @var array of TPkgShopPaymentTransactionItemData,"public function setTotalValue($totalValue) - { - $this->totalValue = $totalValue; - - return $this; - }" -TPkgShopPaymentTransactionDataEndPoint,"* use $this->addRequirement to add the requirements of the container. - * - * @return","public function setType($type) - { - $this->type = $type; - - return $this; - }" -TPkgShopPaymentTransactionDataEndPoint,"* @param TdbShopOrder $oOrder - * @param string $type - must be one of self::TYPE_*","public function getConfirmed() - { - return $this->confirmed; - }" -TPkgShopPaymentTransactionDataEndPoint,"* @param \TdbShopOrder $order - * - * @return $this","public function getConfirmedTimestamp() - { - return $this->confirmedTimestamp; - }" -TPkgShopPaymentTransactionDataEndPoint,"* @param bool $confirmed - * - * @return $this","public function getContext() - { - return $this->context; - }" -TPkgShopPaymentTransactionDataEndPoint,"* @param int $confirmedTimestamp - * - * @return $this","public function getItems() - { - return $this->items; - }" -TPkgShopPaymentTransactionDataEndPoint,"* @param \TPkgShopPaymentTransactionContext $context - * - * @return $this","public function getSequenceNumber() - { - return $this->sequenceNumber; - }" -TPkgShopPaymentTransactionDataEndPoint,"* @param TPkgShopPaymentTransactionItemData $item - * - * @return $this","public function getTotalValue() - { - return $this->totalValue; - }" -TPkgShopPaymentTransactionDataEndPoint,"* @param int $sequenceNumber - * - * @return $this","public function getType() - { - return $this->type; - }" -TPkgShopPaymentTransactionDataEndPoint,"* @param float $totalValue - * - * @return $this","public function getOrder() - { - return $this->order; - }" -TPkgShopPaymentTransactionDataEndPoint,"* @param string $type - * - * @return $this","public function getTotalValueForItemType($sType) - { - $dTotal = 0; - reset($this->items); - /** @var TPkgShopPaymentTransactionItemData $oItem */ - foreach ($this->items as $oItem) { - if ($sType !== $oItem->getType()) { - continue; - }" -TPkgShopPaymentTransactionItemDataEndPoint,* @var int,"public function setValue($value) - { - $this->value = $value; - - return $this; - }" -TPkgShopPaymentTransactionItemDataEndPoint,* @var float,"public function setAmount($amount) - { - $this->amount = $amount; - - return $this; - }" -TPkgShopPaymentTransactionItemDataEndPoint,* @var string,"public function setOrderItemId($orderItemId) - { - $this->orderItemId = $orderItemId; - - return $this; - }" -TPkgShopPaymentTransactionItemDataEndPoint,* @var string,"public function setType($type) - { - $this->type = $type; - - return $this; - }" -TPkgShopPaymentTransactionItemDataEndPoint,* @var TdbShopOrderItem|null,"public function getValue() - { - return $this->value; - }" -TPkgShopPaymentTransactionItemDataEndPoint,"* @param float $value - * - * @return $this","public function getAmount() - { - return $this->amount; - }" -TPkgShopPaymentTransactionItemDataEndPoint,"* @param int $amount - * - * @return $this","public function getOrderItemId() - { - return $this->orderItemId; - }" -TPkgShopPaymentTransactionItemDataEndPoint,"* @param string $orderItemId - * - * @return $this","public function getOrderItem() - { - if (null === $this->orderItem && null !== $this->getOrderItemId()) { - $oOrderItem = TdbShopOrderItem::GetNewInstance(); - if (false === $oOrderItem->Load($this->getOrderItemId())) { - $sMsg = ""unable to load the shop_order_item [{$this->getOrderItemId()}" -TPkgShopPaymentTransactionItemDataEndPoint,"* @param string $type - must be one of self::TYPE_* - * - * @return $this","public function getType() - { - return $this->type; - }" -TPkgShopPaymentTransactionManagerEndPoint,* @param TdbShopOrder $oOrder,"public function __construct(TdbShopOrder $oOrder) - { - $this->order = $oOrder; - }" -TPkgShopPaymentTransactionManagerEndPoint,"* important: the transaction will go through no matter what - make sure you validate the amount using getMaxAllowedValueFor - * before calling this method. - * - * @param TPkgShopPaymentTransactionData $transactionData - * - * @return TdbPkgShopPaymentTransaction","public function addTransaction(TPkgShopPaymentTransactionData $transactionData) - { - $transactionData->checkRequirements(); - - $sTransactionType = $transactionData->getType(); - $amount = $transactionData->getTotalValue(); - $oContext = $transactionData->getContext(); - $iSequenceNumber = $transactionData->getSequenceNumber(); - - $oTransactionType = $this->getTransactionTypeObject($sTransactionType); - - if (null === $iSequenceNumber) { - $iSequenceNumber = $this->getNextTransactionSequenceNumber(); - }" -TPkgShopPaymentTransactionManagerEndPoint,@var SecurityHelperAccess $securityHelper,"public function deleteTransaction($transaction) - { - $transaction->AllowEditByAll(true); - $transaction->Delete(); - }" -TPkgShopPaymentTransactionManagerEndPoint,@var TPkgShopPaymentTransactionItemData $oItem,"public function confirmTransactionById($transactionId, $iConfirmedDate) - { - $oTransaction = TdbPkgShopPaymentTransaction::GetNewInstance(); - if (false === $oTransaction->Load($transactionId)) { - return null; - }" -TPkgShopPaymentTransactionManagerEndPoint,"* @param TdbPkgShopPaymentTransaction $transaction - * - * @return void","public function confirmTransaction($iSequenceNumber, $iConfirmedDate) - { - $oTransaction = TdbPkgShopPaymentTransaction::GetNewInstance(); - $loadData = array('shop_order_id' => $this->order->id, 'sequence_number' => $iSequenceNumber); - if (true === $oTransaction->LoadFromFields($loadData)) { - $oTransaction = $this->confirmTransactionObject($oTransaction, $iConfirmedDate); - }" -TPkgShopPaymentTransactionManagerEndPoint,"* searches for a transaction with matching id number and confirms it. returns the transaction if found, null if not. - * - * @param string $transactionId - * @param int $iConfirmedDate - * - * @return TdbPkgShopPaymentTransaction|null","public function confirmTransactionObject(TdbPkgShopPaymentTransaction $transaction, $iConfirmedDate) - { - if (false === $transaction->fieldConfirmed) { - $transaction->AllowEditByAll(true); - $transaction->SaveFieldsFast( - array('confirmed' => '1', 'confirmed_date' => date('Y-m-d H:i:s', $iConfirmedDate)) - ); - $transaction->AllowEditByAll(false); - // mark order as paid/unpaid depending on the remaining balance - $this->updateOrderPaidStatusBasedOnCurrentBalance(); - $this->updateRealUsedVoucherValueBasedOnTransactions($transaction); - }" -TPkgShopPaymentTransactionManagerEndPoint,"* searches for a transaction with matching sequence number and confirms it. returns the transaction if found, null if not. - * - * @param int $iSequenceNumber - * @param int $iConfirmedDate - unix timestamp - * - * @return \TdbPkgShopPaymentTransaction|null","public function getTransactionBalance($bIncludeUnconfirmedTransactions = false) - { - $dTotal = 0.00; - $sRestriction = ''; - if (false === $bIncludeUnconfirmedTransactions) { - $sRestriction .= "" AND `pkg_shop_payment_transaction`.`confirmed` = '1'""; - }" -TPkgShopPaymentTransactionManagerEndPoint,"* confirm given transaction object. - * - * @param TdbPkgShopPaymentTransaction $transaction - * @param int $iConfirmedDate - * - * @return TdbPkgShopPaymentTransaction","public function getMaxAllowedValueFor($sTransactionType) - { - $dMaxValue = 0; - switch ($sTransactionType) { - case self::TRANSACTION_TYPE_PAYMENT: - $currentTransactionBalance = $this->getTransactionBalance(true); - $dMaxValue = $this->order->fieldValueTotal - $currentTransactionBalance; - break; - case self::TRANSACTION_TYPE_PAYMENT_REVERSAL: - case self::TRANSACTION_TYPE_CREDIT: - $dMaxValue = $this->getTransactionBalance(true); - break; - default: - break; - }" -TPkgShopPaymentTransactionManagerEndPoint,"* @param string $sTransactionType - * - * @return TdbPkgShopPaymentTransactionType - * - * @throws TPkgShopPaymentTransactionException_InvalidTransactionType","public function hasTransactions($sTransactionType = null) - { - $iNumberOfTransactions = 0; - $sTransactionTypeRestriction = ''; - if (null !== $sTransactionType) { - $oTransactionType = $this->getTransactionTypeObject($sTransactionType); - $sTransactionId = MySqlLegacySupport::getInstance()->real_escape_string($oTransactionType->id); - $sTransactionTypeRestriction = "" AND `pkg_shop_payment_transaction`.`pkg_shop_payment_transaction_type_id` = '{$sTransactionId}" -TPkgShopPaymentTransactionManagerEndPoint,"@var array $aTypeCache","public function getBillableProducts($bIncludeUnconfirmedTransactions = true) - { - $aProductList = array(); - $oOrderItemList = $this->order->GetFieldShopOrderItemList(); - $oOrderItemList->GoToStart(); - while ($oOrderItem = $oOrderItemList->Next()) { - $iBilled = $this->getProductAmountWithTransactionType( - $oOrderItem->id, - self::TRANSACTION_TYPE_PAYMENT, - $bIncludeUnconfirmedTransactions - ); - $iRemaining = round($oOrderItem->fieldOrderAmount - $iBilled); - if ($iRemaining > 0) { - $aProductList[$oOrderItem->id] = $iRemaining; - }" -TPkgShopPaymentTransactionManagerEndPoint,"* changes the paid status of the order (if required) based on the current balance - * returns true if the state of the order was changed. - * - * @return bool","public function getRefundableProducts($bIncludeUnconfirmedTransactions = true) - { - $aProductList = array(); - $oOrderItemList = $this->order->GetFieldShopOrderItemList(); - $oOrderItemList->GoToStart(); - while ($oOrderItem = $oOrderItemList->Next()) { - $iBilled = $this->getProductAmountWithTransactionType( - $oOrderItem->id, - self::TRANSACTION_TYPE_PAYMENT, - false - ); - $iRefunded = $this->getProductAmountWithTransactionType( - $oOrderItem->id, - self::TRANSACTION_TYPE_CREDIT, - $bIncludeUnconfirmedTransactions - ); - $iRefunded += $this->getProductAmountWithTransactionType( - $oOrderItem->id, - self::TRANSACTION_TYPE_PAYMENT_REVERSAL, - $bIncludeUnconfirmedTransactions - ); - $iRefundable = round($iBilled + $iRefunded); - if ($iRefundable > 0) { - $aProductList[$oOrderItem->id] = $iRefundable; - }" -TPkgShopPaymentTransactionManagerEndPoint,"* returns the balance of all transactions for an order (without the order value). - * - * @param bool $bIncludeUnconfirmedTransactions - * - * @return float","public function allProductsAreRefundable() - { - $bProductsHaveBeenRefunded = $this->hasTransactions(self::TRANSACTION_TYPE_PAYMENT_REVERSAL) - || $this->hasTransactions(self::TRANSACTION_TYPE_CREDIT); - if (true === $bProductsHaveBeenRefunded) { - return false; - }" -TPkgShopPaymentTransactionManagerEndPoint,"* returns the transaction sequence for the next transaction. - * - * @return int","public function getProductAmountWithTransactionType( - $sOrderItemId, - $sTransactionTypeSystemName, - $bIncludeUnconfirmedTransactions = true - ) { - $sTransactionTypeId = $this->getTransactionTypeObject($sTransactionTypeSystemName)->id; - $iTotal = 0; - $sOrderItemId = MySqlLegacySupport::getInstance()->real_escape_string($sOrderItemId); - $sTransactionTypeId = MySqlLegacySupport::getInstance()->real_escape_string($sTransactionTypeId); - $sOrderId = MySqlLegacySupport::getInstance()->real_escape_string($this->order->id); - $sIncompleteRestriction = ''; - if (false === $bIncludeUnconfirmedTransactions) { - $sIncompleteRestriction = "" AND `pkg_shop_payment_transaction`.`confirmed` = '1'""; - }" -TPkgShopPaymentTransactionManagerEndPoint,"* the max value is always an absolute value (ie positive). - * - * @param string $sTransactionType - must be one of self::TRANSACTION_TYPE_* - * - * @return float","public function getTransactionPositionTotalForType( - $sTransactionPositionType, - $bIncludeUnconfirmedTransactions = true - ) { - $iTotal = 0; - $sOrderId = MySqlLegacySupport::getInstance()->real_escape_string($this->order->id); - $sIncompleteRestriction = ''; - if (false === $bIncludeUnconfirmedTransactions) { - $sIncompleteRestriction = "" AND `pkg_shop_payment_transaction`.`confirmed` = '1'""; - }" -TPkgShopPaymentTransactionManagerEndPoint,"* returns true if there are transactions for the order (pending or not). - * - * @param null|string $sTransactionType - must be one of self::TRANSACTION_TYPE_* - * @psalm-param null|self::TRANSACTION_TYPE_* $sTransactionType - * - * @return bool","public function getTransactionDataFromOrder( - $sTransactionType = TPkgShopPaymentTransactionData::TYPE_PAYMENT, - $aProductAmountRestriction = null, - $bUseConfirmedTransactionsOnly = true - ) { - $dSignMultiplier = 1; - if (TPkgShopPaymentTransactionData::TYPE_PAYMENT === $sTransactionType) { - $aItemBaseToUse = $this->getBillableProducts($bUseConfirmedTransactionsOnly); - }" -TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,* @return void,"public function DefineInterface() - { - parent::DefineInterface(); - - if (false === $this->allowTransactions()) { - return; - }" -TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,* @return void,"public function paymentTransactionCollectAll() - { - if (false === $this->allowTransactions()) { - return; - }" -TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,@var TdbShopOrder $oOrder,"public function paymentTransactionRefundAll() - { - if (false === $this->allowTransactions()) { - return; - }" -TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,@var PaymentHandlerWithTransactionSupportInterface|\TdbShopPaymentHandler $paymentHandler,"public function pkgShopPaymentTransaction_PartialDebit() - { - if (false === $this->allowTransactions()) { - return; - }" -TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,* @return void,"public function pkgShopPaymentTransaction_getPartialCollectForm() - { - $oViewRenderer = new ViewRenderer(); - $oViewRenderer->AddMapper(new TPkgShopPaymentTransactionMapper_CollectionFormForOrder()); - $oViewRenderer->AddSourceObject('order', $this->oTable); - $oViewRenderer->AddSourceObject('paymentType', TPkgShopPaymentTransactionData::TYPE_PAYMENT); - - return $oViewRenderer->Render('pkgShopPaymentTransaction/collection-form.html.twig'); - }" -TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,@var TdbShopOrder $oOrder,"public function pkgShopPaymentTransaction_getPartialRefundForm() - { - $oViewRenderer = new ViewRenderer(); - $oViewRenderer->AddMapper(new TPkgShopPaymentTransactionMapper_CollectionFormForOrder()); - $oViewRenderer->AddSourceObject('order', $this->oTable); - $oViewRenderer->AddSourceObject('paymentType', TPkgShopPaymentTransactionData::TYPE_CREDIT); - - return $oViewRenderer->Render('pkgShopPaymentTransaction/collection-form.html.twig'); - }" -TPkgShopPaymentTransaction_TCMSTableEditorShopOrder,@var PaymentHandlerWithTransactionSupportInterface&\TdbShopPaymentHandler $paymentHandler,"public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - - $aIncludesFromPackage = $this->getViewRendererSnippetDirectory()->getResourcesForSnippetPackage( - 'pkgShopPaymentTransaction' - ); - $aIncludes = array_merge($aIncludes, $aIncludesFromPackage); - - return $aIncludes; - }" -PaymentTransactionHelper,* {@inheritdoc},"public function getProductsCaptureOnOrderCreation(TdbShopOrder $order, $isCaptureOnShipment) - { - $orderItems = $order->GetFieldShopOrderItemList(); - $orderItems->GoToStart(); - $captureItems = array(); - while ($orderedProduct = $orderItems->Next()) { - if (false === $isCaptureOnShipment || false === $this->allowProductCaptureOnShipment($orderedProduct)) { - $captureItems[$orderedProduct->id] = $orderedProduct->fieldOrderAmount; - }" -PaymentTransactionHelper,* {@inheritdoc},"public function getProductsCaptureOnShipping(TdbShopOrder $order, $isCaptureOnShipment) - { - if (false === $isCaptureOnShipment) { - return array(); - }" -PaymentTransactionHelper,* {@inheritdoc},"public function allowProductCaptureOnShipment(TdbShopOrderItem $orderedProduct) - { - return false === $orderedProduct->isDownload(); - }" -TPkgShopPrimaryNavigationMapper_StandardNavi,"* A mapper has to specify its requirements by providing th passed MapperRequirements instance with the - * needed information and returning it. - * - * example: - * - * $oRequirements->NeedsSourceObject(""foo"",'stdClass','default-value'); - * $oRequirements->NeedsSourceObject(""bar""); - * $oRequirements->NeedsMappedValue(""baz""); - * - * @param IMapperRequirementsRestricted $oRequirements","public function GetRequirements(IMapperRequirementsRestricted $oRequirements) - { - $oRequirements->NeedsSourceObject('oPortal', 'TdbCmsPortal'); - }" -TPkgShopPrimaryNavigationMapper_StandardNavi,"* To map values from models to views the mapper has to implement iVisitable. - * The ViewRender will pass a prepared MapeprVisitor instance to the mapper. - * - * The mapper has to fill the values it is responsible for in the visitor. - * - * example: - * - * $foo = $oVisitor->GetSourceObject(""foomodel"")->GetFoo(); - * $oVisitor->SetMapperValue(""foo"", $foo); - * - * - * To be able to access the desired source object in the visitor, the mapper has - * to declare this requirement in its GetRequirements method (see IViewMapper) - * - * @param \IMapperVisitorRestricted $oVisitor - * @param bool $bCachingEnabled - if set to true, you need to define your cache trigger that invalidate the view rendered via mapper. if set to false, you should NOT set any trigger - * @param IMapperCacheTriggerRestricted $oCacheTriggerManager - * - * @return","public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - /** @var $oPortal TdbCmsPortal */ - $oPortal = $oVisitor->GetSourceObject('oPortal'); - - $oNodeList = TdbPkgShopPrimaryNaviList::GetListForCmsPortalId($oPortal->id); - - $aTree = array(); - while ($oNode = $oNodeList->Next()) { - $aTree[] = $oNode->getPkgCmsNavigationNodeObject(); - }" -TPkgShopPrimaryNavi,* @return AbstractPkgCmsNavigationNode|null,"public function getPkgCmsNavigationNodeObject() - { - $oNaviNode = null; - if (true === empty($this->fieldTarget)) { - return $oNaviNode; - }" -TPkgShopPrimaryNavigation_TPkgCmsNavigationNodeWithRootShopCategoriesAsChildren,* @return AbstractPkgCmsNavigationNode[]|null,"public function getAChildren() - { - if (true === $this->bDisableSubmenu) { - return null; - }" -TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,* @extends AbstractPkgCmsNavigationNode,"public function load($sId) - { - $category = TdbShopCategory::GetNewInstance($sId); - if (false === $category->AllowDisplayInShop() || false == $category->fieldActive) { - return false; - }" -TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,"* @param string $sId - shop category id - * - * @return bool","public function loadFromNode($oNode) - { - if (false === $oNode->fieldActive) { - return false; - }" -TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,"* @param TdbShopCategory $oNode - * - * @return bool","public function getAChildren() - { - if (true === $this->bDisableSubmenu) { - return null; - }" -TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,* @return AbstractPkgCmsNavigationNode[]|null,"public function getBIsActive() - { - if (null === $this->bIsActive) { - $this->bIsActive = false; - /** @var $oNode TdbShopCategory */ - $oNode = $this->getNodeCopy(); - $oActiveCategory = TdbShop::GetInstance()->GetActiveCategory(); - if ($oActiveCategory && $oNode && $oActiveCategory->id === $oNode->id) { - $this->bIsActive = true; - }" -TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,@var $oNode TdbShopCategory,"public function getBIsExpanded() - { - if (null === $this->bIsExpanded) { - $this->bIsExpanded = $this->getBIsActive(); - if (false === $this->bIsExpanded) { - /** @var $oNode TdbShopCategory */ - $oNode = $this->getNodeCopy(); - $aCategoryPath = TdbShop::GetInstance()->GetActiveCategoryPath(); - if ($oNode && is_array($aCategoryPath) && isset($aCategoryPath[$oNode->id])) { - $this->bIsExpanded = true; - }" -TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category,@var TdbShopCategory[] $categoryList,"public function getNodeIconURL() - { - $sURL = null; - /** @var $oNode TdbShopCategory */ - $oNode = $this->getNodeCopy(); - $oImage = $oNode->GetImage(0, 'navi_icon_cms_media_id', $this->dummyImagesAllowed()); - if ($oImage) { - $sURL = $oImage->GetRelativeURL(); - $this->sNavigationIconId = $oImage->id; - }" -TPkgShopPrimaryNavigation_TShop,* @var TdbPkgShopPrimaryNaviList[],"public function GetFieldShopPrimaryNaviList() - { - $activePortal = self::getPortalDomainService()->getActivePortal(); - if (null === $activePortal) { - if (false === isset($this->primaryNavigationList['no-portal'])) { - $this->primaryNavigationList['no-portal'] = TdbPkgShopPrimaryNaviList::GetList(); - }" -MTPkgShopPrimaryNavigation,* {@inheritdoc},"public function Accept(IMapperVisitorRestricted $oVisitor, $bCachingEnabled, IMapperCacheTriggerRestricted $oCacheTriggerManager) - { - $activePortal = $this->getPortalDomainService()->getActivePortal(); - if ($bCachingEnabled) { - $oCacheTriggerManager->addTrigger($activePortal->table, $activePortal->id); - }" -MTPkgShopPrimaryNavigation,* @return null|string,"public function _AllowCache() - { - return true; - }" -MTPkgShopPrimaryNavigation,@var ActivePageServiceInterface $activePageService,"public function _GetCacheParameters() - { - $parameters = parent::_GetCacheParameters(); - - $parameters['sActivePageId'] = $this->getActivePageId(); - - $parameters['activeUserGroups'] = implode(',', $this->getActiveUserGroups()); - $parameters['activeCategoryId'] = $this->getActiveCategoryId(); - - return $parameters; - }" -ChameleonSystemShopProductExportBundle,* @return void,"public function build(ContainerBuilder $container) - { - parent::build($container); - $container->addCompilerPass(new ExportHandlerPass()); - }" -ShopProductExporter,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\Interfaces\ResultFactoryInterface,"public function __construct( - ResultFactoryInterface $resultFactory, - ShopServiceInterface $activeShopService, - StateFactoryInterface $stateFactory - ) { - $this->resultFactory = $resultFactory; - $shopConfig = $activeShopService->getConfiguration(); - $this->validShopExportKey = $shopConfig['export_key']; - $this->stateFactory = $stateFactory; - }" -ShopProductExporter,* @var ShopProductExportHandlerInterface[],"public function registerHandler($alias, ShopProductExportHandlerInterface $exportHandler) - { - $this->exportHandler[$alias] = $exportHandler; - }" -ShopProductExporter,* @var string,"public function isValidExportKey($exportKey) - { - return $exportKey === $this->validShopExportKey; - }" -ShopProductExporter,* @var StateFactoryInterface,"public function export(ConfigurationInterface $moduleConfiguration, $alias) - { - if (false === $this->aliasExists($alias)) { - throw new \ErrorException(""alias [{$alias}" -ShopProductExporter,"* @param ResultFactoryInterface $resultFactory - * @param ShopServiceInterface $activeShopService - * @param StateFactoryInterface $stateFactory","public function aliasExists($alias) - { - return array_key_exists($alias, $this->exportHandler); - }" -ChameleonSystemShopProductExportExtension,* @return void,"public function load(array $config, ContainerBuilder $container) - { - $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - }" -ExportHandlerPass,"* You can modify the container here before it is dumped to PHP code. - * - * @param ContainerBuilder $container - * - * @api - * - * @return void","public function process(ContainerBuilder $container) - { - $exporter = $container->getDefinition('chameleon_system_shop_product_export.exporter'); - $exportHandlerIds = $container->findTaggedServiceIds('chameleon_system_shop_product_export.export_handler'); - $aliasRegistered = array(); - foreach ($exportHandlerIds as $exportHandlerId => $tagAttributes) { - foreach ($tagAttributes as $attributes) { - $alias = (isset($attributes['alias'])) ? $attributes['alias'] : null; - if (null === $alias) { - throw new \ErrorException(""the service {$exportHandlerId}" -,"* @param string $exportKey - * - * @return bool","public function isValidExportKey($exportKey); - - /** - * @param ConfigurationInterface $moduleConfiguration - * @param string $alias - * - * @return string - */ - public function export(ConfigurationInterface $moduleConfiguration, $alias); - - /** - * @param string $alias - * @param ShopProductExportHandlerInterface $exportHandler - * - * @return void - */ - public function registerHandler($alias, ShopProductExportHandlerInterface $exportHandler); - - /** - * @param string $alias - * - * @return bool - */ - public function aliasExists($alias); -}" -,"* do any initialization work that needs to be done before you want to run the export. - * - * @return void","public function Init(); - - /** - * @param \TdbShopArticleList $oArticleList - * @return void - */ - public function SetArticleList(\TIterator $articleList); - - /** - * @param bool $debug - * @return void - */ - public function SetDebug($debug); - - /** - * Run the export. returns true if the export was successful, otherwise false - * - * @return bool - */ - public function Run(); -}" -ShopProductExportModule,* @var string,"public function __construct(ShopProductExporterInterface $productExporter, DbAdapterInterface $dbAdapter, InputFilterUtilInterface $inputFilterUtil, $cacheDir) - { - parent::__construct(); - - $this->productExporter = $productExporter; - $this->dbAdapter = $dbAdapter; - $this->inputFilterUtil = $inputFilterUtil; - $this->cacheDir = $cacheDir; - }" -ShopProductExportModule,* @var string,"public function Init() - { - parent::Init(); - - $this->loadConfiguration(); - $this->getStateDataFromRequest(); - - if (false === is_dir($this->cacheDir)) { - if (!@mkdir($this->cacheDir, 0777, true) && !is_dir($this->cacheDir)) { - throw new ErrorException(sprintf('failed to create cache folder: %s', $this->cacheDir)); - }" -ShopProductExportModule,* @var \ChameleonSystem\ShopProductExportBundle\Interfaces\ShopProductExporterInterface,"public function Accept( - IMapperVisitorRestricted $oVisitor, - $bCachingEnabled, - IMapperCacheTriggerRestricted $oCacheTriggerManager - ) { - $responseData = array( - 'exportData' => null, - 'error' => false, - 'spotName' => $this->sModuleSpotName, - ); - - if (false === $this->productExporter->aliasExists($this->exportView)) { - $responseData['error'] = 'no-view'; - }" -ShopProductExportModule,* @var \ChameleonSystem\ShopBundle\objects\ArticleList\DatabaseAccessLayer\Interfaces\DbAdapterInterface,"public function _AllowCache() - { - return false; - }" -TPkgShopProductExportBaseEndPoint,"* article list loaded by module or something else that calls this class. - * - * @var TIterator|null","public function Init() - { - }" -TPkgShopProductExportBaseEndPoint,"* absolute path to the cache file. - * - * @var string|null","public function Run() - { - $bSuccess = false; - - set_time_limit(1800); - $this->getCache()->disable(); - TCacheManagerRuntimeCache::SetEnableAutoCaching(false); - if ($this->Prepare()) { - $bSuccess = $this->Perform(); - }" -TPkgShopProductExportBaseEndPoint,"* false if the export is in cache so load the cache file and pass it to the output - * true if there is no cache enabled or cache item is out of date. - * - * @var bool","public function getAttributeName($sIdentifier) - { - /** @var array $aAttributesForSystemNames */ - static $aAttributesForSystemNames = null; - - /** @var array $aAttributesForIds */ - static $aAttributesForIds = null; - - if (null === $aAttributesForSystemNames && null === $aAttributesForIds) { - $oAttributesList = TdbShopAttributeList::GetList(); - while ($oAttribute = $oAttributesList->Next()) { - $sName = $oAttribute->GetName(); - $aAttributesForSystemNames[$oAttribute->fieldSystemName] = $sName; - $aAttributesForIds[$oAttribute->id] = $sName; - }" -TPkgShopProductExportBaseEndPoint,"* only set if cached file is set - output will be written into file instead of output buffer. - * - * @var bool|resource","public function GetArticleAttributeValueListForAttributeNames( - $oArticle, - $aAttributeNames, - $sFieldName = 'system_name' - ) { - $aList = array(); - foreach ($aAttributeNames as $sAttributeName) { - $aList[$sAttributeName] = $this->GetArticleAttributeValueForAttributeName( - $oArticle, - $sAttributeName, - $sFieldName, - false - ); - }" -TPkgShopProductExportBaseEndPoint,"* set to true on debug state. - * - * @var bool","public function SetArticleList(TIterator $oArticleList) - { - $this->oArticleList = $oArticleList; - }" -TPkgShopProductExportBaseEndPoint,"* key will be accessed by exports - value should be system_name of the attribute that will be fetched. - * - * @var array","public function GetArticleList() - { - return $this->oArticleList; - }" -TPkgShopProductExportBaseEndPoint,"* hook is called before an article is exported. - * - * @param TdbShopArticle $oArticle - * - * @return TdbShopArticle","public function GetCacheFile() - { - return $this->sCacheFile; - }" -TPkgShopProductExportBaseEndPoint,"* do any initialization work that needs to be done before you want to run the export. - * - * @return void","public function GetGenerateFile() - { - return $this->bGenerateFile; - }" -TPkgShopProductExportBaseEndPoint,"* Run the export. returns true if the export was successful, otherwise false - * this method should not be overwritten in child classes. - * - * @return bool - * @final","public function SetDebug($bDebug) - { - $this->bDebug = $bDebug; - }" -TPkgShopProductExportBaseEndPoint,"* prepare the export - setup temp tables etc - * return false if the preparation failed. - * - * @return bool","public function GetDebug() - { - return $this->bDebug; - }" -TPkgShopProductExportBaseEndPoint,"* method is called once on prepare of export - * set attributes system names specific keys that will be used by exports - * by default we set the ean and mpnr - * you can overwrite these keys (and add custom keys) with the help of the virtual class manager. - * - * e.g.$this->aAttributes['brand'] = 'hersteller'; - * - * @return void","public function GetAllowedAttributes() - { - static $aAttributes = null; - - if (null === $aAttributes) { - $aAttributes = array(); - $oAttributeList = TdbShopAttributeList::GetList(); - $oAttributeList->GoToStart(); - while ($oAttribute = $oAttributeList->Next()) { - $aAttributes[] = $oAttribute->fieldSystemName; - }" -TCMSFieldText_ShowExportURL,"* varchar field with javascript to set the blog post url onblur. - * /*","public function GetExportURLList() - { - $sReturn = ''; - if (isset($this->oTableRow) && $this->oTableRow instanceof TdbShop) { - /* @var $oShop TdbShop */ - $oShop = $this->oTableRow; - $oPortalList = $oShop->GetFieldCmsPortalList(); - $systemPageService = $this->getSystemPageService(); - while ($oPortal = $oPortalList->Next()) { - $sExportPageURL = $systemPageService->getLinkToSystemPageRelative('productexport', array(), $oPortal); - if (strstr($sExportPageURL, 'javascript:alert')) { - $sReturn = '

'.TGlobal::OutHTML(TGlobal::Translate('chameleon_system_shop_product_export.field_show_export_url.error_export_page_missing')).'
'; - continue; - }" -TCMSFieldText_ShowExportURL,"* sets methods that are allowed to be called via URL (ajax call). - * - * @return void","public function GetHTML() - { - $sHtml = parent::GetHTML(); - $sHtml .= 'getTranslator()->trans('chameleon_system_shop_product_export.field_show_export_url.show_list_button_title')).'""/>'; - $sHtml .= '
'; - $sHtml .= "" - ""; - return $aIncludes; - }" -for,"* Select right RatingService object. - * - * @return TdbPkgShopRatingService|null","public function _AllowCache() - { - return false; - }" -for,"* loads config for instance. - * - * @return TdbPkgShopRatingServiceWidgetConfig|null","public function _GetCacheTableInfos() - { - $aTrigger = parent::_GetCacheTableInfos(); - if (!is_array($aTrigger)) { - $aTrigger = array(); - }" -for,"* Module class for RatingTeaser-Module. - * -/*","public function Execute() - { - parent::Execute(); - $this->data['oModuleConfig'] = $this->GetModuleConfig(); - $oItem = $this->GetRatingItem(); - if ($oItem) { - $this->data['sRatingItemContent'] = $oItem->Render(); - }" -for,* @var TdbPkgShopRatingServiceTeaserCnf|null,"public function _AllowCache() - { - return false; - }" -for,"* Select one (random) rating item. - * - * @return TdbPkgShopRatingServiceRating|null","public function _GetCacheTableInfos() - { - $aTrigger = parent::_GetCacheTableInfos(); - if (!is_array($aTrigger)) { - $aTrigger = array(); - }" -ChameleonSystemShopWishlistExtension,"* {@inheritdoc} - * - * @return void","public function load(array $configs, ContainerBuilder $container) - { - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/')); - $loader->load('services.xml'); - }" -TCMSCronJob_CleanWishlist,* @return void,"public function __construct() - { - parent::__construct(); - }" -TPkgShopWishlist,"* adds an article to the wishlist - returns the new amount of that article on the list. - * - * @param string $sArticleId - * @param float $dAmount - * @param string $sComment - optional comment - * - * @return float","public function AddArticle($sArticleId, $dAmount = 1, $sComment = null) - { - $dNewAmount = 0; - $aItemData = array(); - $oItem = TdbPkgShopWishlistArticle::GetNewInstance(); - /** @var $oItem TdbPkgShopWishlistArticle */ - if ($oItem->LoadFromFields(array('pkg_shop_wishlist_id' => $this->id, 'shop_article_id' => $sArticleId))) { - $aItemData = $oItem->sqlData; - $aItemData['amount'] += $dAmount; - }" -TPkgShopWishlist,@var $oItem TdbPkgShopWishlistArticle,"public function GetMsgConsumerName() - { - return TdbPkgShopWishlist::MSG_CONSUMER_BASE_NAME.$this->id; - }" -TPkgShopWishlist,"* return the msg consumer name for the wishlist instance. - * - * @return string","public function Render($sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array()) - { - $oView = new TViewParser(); - $oMsgManager = TCMSMessageManager::GetInstance(); - $sMessages = ''; - if ($oMsgManager->ConsumerHasMessages($this->GetMsgConsumerName())) { - $sMessages = $oMsgManager->RenderMessages($this->GetMsgConsumerName()); - }" -TPkgShopWishlist,"* render the filter. - * - * @param string $sViewName - name of the view - * @param string $sViewType - where to look for the view - * @param array $aCallTimeVars - optional parameters to pass to render method - * - * @return string","public function GetLink($sMode = '', $aAdditionalParameter = array()) - { - if (!empty($sMode)) { - $aAdditionalParameter[MTPkgShopWishlistCore::URL_MODE_PARAMETER_NAME] = $sMode; - }" -TPkgShopWishlist,"* return link to the private view of the wishlist. - * - * @param string $sMode - select a mode of the wishlist (such as SendForm) - * @param array $aAdditionalParameter - * - * @return string","public function GetPublicLink($aAdditionalParameter = array()) - { - $oShopConfig = TdbShop::GetInstance(); - $aAdditionalParameter[MTPkgShopWishlistPublicCore::URL_PARAMETER_NAME] = array('id' => $this->id); - - return $oShopConfig->GetLinkToSystemPage('wishlist-public', $aAdditionalParameter, true); - }" -TPkgShopWishlist,"* return the public link to the wishlist. - * - * @param array $aAdditionalParameter - * - * @return string","public function GetNumberOfItemsInList() - { - $oWishlistItems = $this->GetFieldPkgShopWishlistArticleList(); - - return $oWishlistItems->Length(); - }" -TPkgShopWishlist,"* returns the number of wishlist items on the list. - * - * @return int","public function GetFieldPkgShopWishlistArticleList() - { - $oWishlistItems = $this->GetFromInternalCache('oPkgShopWishlistArticleList'); - if (is_null($oWishlistItems)) { - $oWishlistItems = TdbPkgShopWishlistArticleList::GetListForPkgShopWishlistId($this->id, $this->iLanguageId); - $oWishlistItems->bAllowItemCache = true; - $this->SetInternalCache('oPkgShopWishlistArticleList', $oWishlistItems); - }" -TPkgShopWishlist,"* Artikel der Wunschliste. - * - * @return TdbPkgShopWishlistArticleList","public function GetFieldPkgShopWishlistMailHistoryList() - { - $oWishlistHistoryItems = $this->GetFromInternalCache('oPkgShopWishlistMailHistoryList'); - if (is_null($oWishlistHistoryItems)) { - $oWishlistHistoryItems = TdbPkgShopWishlistMailHistoryList::GetListForPkgShopWishlistId($this->id, $this->iLanguageId); - $oWishlistHistoryItems->bAllowItemCache = true; - $this->SetInternalCache('oPkgShopWishlistMailHistoryList', $oWishlistHistoryItems); - }" -TPkgShopWishlist,"* Wunschslisten Mailhistory. - * - * @return TdbPkgShopWishlistMailHistoryList","public function GetDescriptionAsHTML() - { - $sText = trim($this->fieldDescription); - $sText = TGlobal::OutHTML($sText); - $sText = nl2br($sText); - - return $sText; - }" -TPkgShopWishlist,"* use this method to add any variables to the render method that you may - * require for some view. - * - * @param string $sViewName - the view being requested - * @param string $sViewType - the location of the view (Core, Custom-Core, Customer) - * - * @return array","public function SendPerMail($sToMail, $sToName, $sComment) - { - $bSendSuccess = false; - $oOwner = $this->GetFieldDataExtranetUser(); - $oMail = TdbDataMailProfile::GetProfile('SendWishlist'); - $aMailData = array('to_name' => $sToName, 'to_mail' => $sToMail, 'comment' => $sComment, 'sWishlistURL' => $this->GetPublicLink()); - $oMail->AddDataArray($aMailData); - $aUserData = $oOwner->GetObjectPropertiesAsArray(); - $oMail->AddDataArray($aUserData); - $oMail->ChangeFromAddress($oOwner->GetUserEMail(), $oOwner->fieldFirstname.' '.$oOwner->fieldLastname); - $oMail->ChangeToAddress($sToMail, $sToName); - if ($oMail->SendUsingObjectView('emails', 'Customer')) { - $bSendSuccess = true; - $oHistory = TdbPkgShopWishlistMailHistory::GetNewInstance(); - /** @var $oHistory TdbPkgShopWishlistMailHistory */ - $aData = array('to_name' => $sToName, 'to_email' => $sToMail, 'comment' => $sComment, 'datesend' => date('Y-m-d H:i:s'), 'pkg_shop_wishlist_id' => $this->id); - $oHistory->LoadFromRow($aData); - $oHistory->AllowEditByAll(true); - $oHistory->Save(); - }" -TPkgShopWishlistArticle,"* return comment text as html. - * - * @return string","public function GetCommentAsHTML() - { - $sText = trim($this->fieldComment); - $sText = TGlobal::OutHTML($sText); - $sText = nl2br($sText); - - return $sText; - }" -TPkgShopWishlistArticle,"* get link to remove item from wishlist. - * - * @param bool $bIncludePortalLink - * - * @return string","public function GetRemoveFromWishlistLink($bIncludePortalLink = false) - { - $oShopConfig = TdbShop::GetInstance(); - $aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'RemoveFromWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_MESSAGE_CONSUMER => MTShopBasketCore::MSG_CONSUMER_NAME); - - return $this->getActivePageService()->getLinkToActivePageRelative($aParameters); - }" -TShopWishlistArticle,"* return the link that can be used to add the article to the users wishlist. - * - * @param bool $bIncludePortalLink - * @param bool $bRedirectToLoginPage - * - * @return string","public function GetToWishlistLink($bIncludePortalLink = false, $bRedirectToLoginPage = true) - { - $oShopConfig = TdbShop::GetInstance(); - - $aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'AddToWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_ITEM_AMOUNT => 1, MTShopBasketCore::URL_MESSAGE_CONSUMER => $this->GetMessageConsumerName()); - - $aIncludeParams = TdbShop::GetURLPageStateParameters(); - $oGlobal = TGlobal::instance(); - foreach ($aIncludeParams as $sKeyName) { - if ($oGlobal->UserDataExists($sKeyName) && !array_key_exists($sKeyName, $aParameters)) { - $aParameters[$sKeyName] = $oGlobal->GetUserData($sKeyName); - }" -MTPkgShopWishlistCore,* controlls the mode of the module.,"public function Init() - { - parent::Init(); - $this->aUserInput = $this->global->GetUserData(TdbPkgShopWishlist::URL_PARAMETER_FILTER_DATA); - if ($this->global->userdataExists(self::URL_MODE_PARAMETER_NAME)) { - $aAllowedModes = array('', 'SendForm'); - $sMode = $this->global->GetUserData(self::URL_MODE_PARAMETER_NAME); - if (in_array($sMode, $aAllowedModes)) { - $this->sActiveMode = $sMode; - }" -MTPkgShopWishlistCore,* @var string,"public function Execute() - { - parent::Execute(); - if (!empty($this->sActiveMode)) { - switch ($this->sActiveMode) { - case 'SendForm': - $this->ExecuteSendFormMode(); - break; - default: - break; - }" -MTPkgShopWishlistPublicCore,"* module is used to allow a user to search for public wishlist, and to display - * the detailpage of a wishlist when given the lists id. -/*","public function Init() - { - parent::Init(); - if ($this->global->userdataExists(self::URL_PARAMETER_NAME)) { - $this->aUserInput = $this->global->GetUserData(self::URL_PARAMETER_NAME); - if (!is_array($this->aUserInput)) { - $this->aUserInput = array(); - }" -MTPkgShopWishlistPublicCore,"* active wishlist if there is one. - * - * @var TdbPkgShopWishlist","public function Execute() - { - parent::Execute(); - $this->data['oActiveWishlist'] = $this->oActiveWishlist; - - return $this->data; - }" -MTShopWishlistBasketCore,"* Adds the article passed to the wishlist of the user (if the user is logged in). - * - * @param string $sArticleId - * @param float $dAmount - * @param string $sMessageHandler - * @param bool $bIsInternalCall - * - * @return void","public function GetHtmlHeadIncludes() - { - $aIncludes = parent::GetHtmlHeadIncludes(); - $aIncludes = array_merge($aIncludes, $this->getResourcesForSnippetPackage('pkgShop/shopBasket')); - - return $aIncludes; - }" -TShopWishlistDataExtranetUser,"* add an article to the wishlist. - * - * @param string $sArticleId - * @param float $dAmount - * - * @return float - new amount on list","public function AddArticleIdToWishlist($sArticleId, $dAmount = 1) - { - $dNewAmountOnList = 0; - $oWishlist = $this->GetWishlist(true); - $dNewAmountOnList = $oWishlist->AddArticle($sArticleId, $dAmount); - - return $dNewAmountOnList; - }" -TShopWishlistDataExtranetUser,"* remove an article form the wishlist. - * - * @param string $sPkgShopWishlistArticleId - the id of the item on the list - * - * @return void","public function RemoveArticleFromWishlist($sPkgShopWishlistArticleId) - { - $oWishlist = $this->GetWishlist(true); - $oWishlistItem = TdbPkgShopWishlistArticle::GetNewInstance(); - /** @var $oWishlistItem TdbPkgShopWishlistArticle */ - if ($oWishlistItem->LoadFromFields(array('pkg_shop_wishlist_id' => $oWishlist->id, 'id' => $sPkgShopWishlistArticleId))) { - $oWishlistItem->AllowEditByAll(true); - $oWishlistItem->Delete(); - }" -TShopWishlistDataExtranetUser,@var $oWishlistItem TdbPkgShopWishlistArticle,"public function GetWishlist($bCreateIfNotExists = false) - { - /** @var TdbPkgShopWishlist|null $oWishlist */ - $oWishlist = $this->GetFromInternalCache('oUserWishlist'); - - if (is_null($oWishlist)) { - $oWishlists = $this->GetFieldPkgShopWishlistList(); - if ($oWishlists->Length() > 0) { - /** @var TdbPkgShopWishlist $oWishlist */ - $oWishlist = $oWishlists->Current(); - }"