/** * create new item * * @param array properties */ public function __construct($props, $session = null) { if (is_array($props) && isset($props['Seller'])) { $props['Seller'] = \Services\Ebay::loadModel('User', $props['Seller'], $session); } parent::__construct($props, $session); }
/** * create a new item list * * @param array properties * @param object \Services\Ebay\Session */ public function __construct($props, $session = null) { if (isset($props['CustomCategories']) && isset($props['CustomCategories']['Category'])) { if (isset($props['CustomCategories']['Category'][0])) { $this->categories = $props['CustomCategories']['Category']; } else { $this->categories = array($props['CustomCategories']['Category']); } unset($props['CustomCategories']); } parent::__construct($props, $session); }
/** * create new model * * @param array * @param object */ public function __construct($props, $session = null) { if (isset($props['AccountEntry'])) { $entries = $props['AccountEntry']; unset($props['AccountEntry']); if (isset($entries[0])) { $this->entries = $entries; } else { $this->entries = array($entries); } } parent::__construct($props, $session); }
/** * create new feedback model * * @param array feedback */ public function __construct($transactions, $session = null) { if (isset($transactions['Transactions']['Transaction'])) { if (!isset($transactions['Transactions']['Transaction'][0])) { $transactions['Transactions']['Transaction'] = array($transactions['Transactions']['Transaction']); } foreach ($transactions['Transactions']['Transaction'] as $tmp) { array_push($this->transactions, \Services\Ebay::loadModel('Transaction', $tmp, $session)); } unset($transactions['Transactions']); } parent::__construct($transactions); }
/** * constructor * * @param array */ public function __construct($props, $session = null) { if (!empty($props)) { if (isset($props[0])) { foreach ($props as $tmp) { $this->messages[] = $tmp['DisputeMessage']['MessageText']; } } else { $this->messages = array($messages['DisputeMessage']['MessageText']); } } parent::__construct($props, $session); }
/** * create a new list of disputes * * @param array return value from GetUserDisputes * @param \Services\Ebay\Session */ public function __construct($props, \Services\Ebay\Session $session = null) { if (isset($props['DisputeArray'])) { $disputes = $props['DisputeArray']; unset($props['DisputeArray']); if (isset($disputes['Dispute'][0])) { $this->disputes = $disputes['Dispute']; } else { $this->disputes = array($disputes['Dispute']); } } parent::__construct($props, $session); }
/** * create new feedback model * * @param array feedback */ public function __construct($bids, $session = null) { $this->count = (int) $bids['Bids']['Count']; if (isset($bids['Bids']['Bid'])) { if (!isset($bids['Bids']['Bid'][0])) { $bids['Bids']['Bid'] = array($bids['Bids']['Bid']); } foreach ($bids['Bids']['Bid'] as $tmp) { array_push($this->bids, \Services\Ebay::loadModel('Bid', $tmp, $session)); } unset($bids['Bids']); } parent::__construct($bids); }
/** * create a new item list * * @param array properties * @param object \Services\Ebay\Session */ public function __construct($props, $session = null) { if (isset($props['ItemArray'])) { if (is_array($props['ItemArray'])) { if (!isset($props['ItemArray']['Item'][0])) { $props['ItemArray']['Item'] = array($props['ItemArray']['Item']); } foreach ($props['ItemArray']['Item'] as $item) { array_push($this->items, \Services\Ebay::loadModel('Item', $item, $session)); } } unset($props['ItemArray']); } parent::__construct($props, $session); }
/** * create new feedback model * * @param array feedback */ public function __construct($messages, $session = null) { $this->moreItems = $messages['HasMoreItems'] == 'false' ? false : true; $this->pages = (int) $messages['PaginationResult']['TotalNumberOfPages']; $this->entries = (int) $messages['PaginationResult']['TotalNumberOfEntries']; if (isset($messages['MemberMessage'])) { if (!isset($messages['MemberMessage'][0])) { $messages['MemberMessage'] = array($messages['MemberMessage']); } foreach ($messages['MemberMessage'] as $tmp) { array_push($this->messages, \Services\Ebay::loadModel('MemberMessage', $tmp, $session)); } unset($messages['MemberMessage']); } parent::__construct($messages); }
/** * create new model * * @param array * @param object */ public function __construct($props, $session = null) { if (isset($props['SearchResultItemArray']['SearchResultItem'])) { $items = $props['SearchResultItemArray']['SearchResultItem']; unset($props['SearchResultItemArray']['SearchResultItem']); if (isset($items[0])) { $items = $items; } else { $items = array($items); } foreach ($items as $tmp) { array_push($this->items, \Services\Ebay::loadModel('Item', $tmp['Item'], $session)); } } parent::__construct($props, $session); }
/** * create a new order * * @param array * @param object */ public function __construct($props, $session = null) { parent::__construct($props, $session); $this->properties['TransactionArray'] = array('Transaction' => array()); $this->properties['ShippingDetails'] = array('ShippingServiceOptions' => array(), 'InternationalShippingServiceOption' => array(), 'SalesTax' => array()); }
/** * Constructor * * @param array $props properties * @param \Services\Ebay\Session $session session * @param integer $DetailLevel detail-level */ public function __construct($props, $session = null, $DetailLevel = 0) { parent::__construct($props, $session, $DetailLevel); $this->user = \Services\Ebay::loadModel('User', $props['User'], $session); unset($this->properties['User']); }