* *
  • MerchantRegistrationDetails: OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails
  • * * */ class OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification extends OffAmazonPaymentsNotifications_NotificationImpl { /** * Construct new OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification * * @param OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata metadata for request * @param mixed $data DOMElement or Associative Array * to construct from. * * Valid properties: * */ public function __construct( OffAmazonPaymentsNotifications_NotificationMetadata $notificationMetadata, $data = null ) { $this->fields = array ( 'MerchantRegistrationDetails' => array( 'FieldValue' => null, 'FieldType' => 'OffAmazonPaymentsNotifications_Model_MerchantRegistrationDetails' ) ); parent::__construct( $notificationMetadata, "SolutionProviderMerchantNotification", $data ); } /** * Construct OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification * from XML string * * @param string $xml XML string to construct from * * @return OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification */ public static function fromXML($xml) { $dom = new DOMDocument(); $dom->loadXML($xml); $xpath = new DOMXPath($dom); $xpath->registerNamespace('a', self::getNamespace()); $response = $xpath->query('//a:SolutionProviderMerchantNotification'); if ($response->length == 1) { return new OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification( $response->item(0) ); } else { throw new Exception( "Unable to construct " . "OffAmazonPaymentsNotifications_Model_SolutionProviderMerchantNotification" . "from provided XML. Make sure that SolutionProviderMerchantNotification" . "is a root element" ); } } /** * Gets the value of the SolutionProviderMerchantNotification. * * @return OrderReference property value */ public function getMerchantRegistrationDetails() { return $this->fields['MerchantRegistrationDetails']['FieldValue']; } /** * Sets the value of the MerchantRegistrationDetails. * * @param OrderReference $value new value * * @return void */ public function setMerchantRegistrationDetails($value) { $this->fields['MerchantRegistrationDetails']['FieldValue'] = $value; return; } /** * Sets the value of the MerchantRegistrationDetails * and returns this instance * * @param MerchantRegistrationDetails $value MerchantRegistrationDetails * * @return OffAmazonPaymentsServices_Model_MerchantRegistrationDetails instance */ public function withMerchantRegistrationDetails($value) { $this->setMerchantRegistrationDetails($value); return $this; } /** * Checks if MerchantRegistrationDetails is set * * @return bool true if MerchantRegistrationDetails property is set */ public function isSetMerchantRegistrationDetails() { return !is_null($this->fields['MerchantRegistrationDetails']['FieldValue']); } /** * XML Representation for this object * * @return string XML for this object */ public function toXML() { $xml = ""; $xml .= ""; $xml .= $this->_toXMLFragment(); $xml .= ""; return $xml; } }