EkomiRequestPutProduct

Class PutProduct.

Defined (1)

The class is defined in the following location(s).

/includes/libraries/Ekomi/Request/PutProduct.php  
  1. class PutProduct extends AbstractRequest{ 
  2. private $productId; 
  3. private $productName; 
  4. private $productOther = null; 
  5. private $productCanonicalLink; 
  6.  
  7. /** 
  8. * Exclude parameters from SOAP Call 
  9. * @var array 
  10. */ 
  11. protected $soapExcludeItems = array('type'); 
  12.  
  13. public function getName() { 
  14. return 'putProduct'; 
  15.  
  16. public function getQuery($type='CURL') { 
  17. $query = array( 
  18. 'auth' => '',  
  19. 'version' => $this->getVersion(),  
  20. 'type' => $this->getType(),  
  21. 'product_id' => $this->getProductId(),  
  22. 'product_name' => $this->getProductName(),  
  23. 'product_other' => json_encode($this->getOther()->getQuery()),  
  24. 'charset' => $this->getCharset(),  
  25. 'product_canonical_link' => $this->getProductCanonicalLink() 
  26. ); 
  27.  
  28. if($type==='SOAP') { 
  29. return $this->unsetItemsInArray($query); 
  30.  
  31. return $query; 
  32.  
  33. /** 
  34. * Init PutProductOther if it's null and get 
  35. * @return PutProductOther 
  36. */ 
  37. public function getOther() { 
  38. if($this->getProductOther() === null) { 
  39. $this->setProductOther(new PutProductOther()); 
  40. return $this->getProductOther(); 
  41.  
  42. /** 
  43. * @return mixed 
  44. */ 
  45. public function getProductId() 
  46. return $this->productId; 
  47.  
  48. /** 
  49. * @param mixed $productId 
  50. * @return PutProduct 
  51. */ 
  52. public function setProductId($productId) 
  53. $this->productId = $productId; 
  54. return $this; 
  55.  
  56. /** 
  57. * @return mixed 
  58. */ 
  59. public function getProductName() 
  60. return $this->productName; 
  61.  
  62. /** 
  63. * @param mixed $productName 
  64. * @return PutProduct 
  65. */ 
  66. public function setProductName($productName) 
  67. $this->productName = $productName; 
  68. return $this; 
  69.  
  70. /** 
  71. * @return null 
  72. */ 
  73. public function getProductOther() 
  74. return $this->productOther; 
  75.  
  76. /** 
  77. * @param null $productOther 
  78. * @return PutProduct 
  79. */ 
  80. public function setProductOther($productOther) 
  81. $this->productOther = $productOther; 
  82. return $this; 
  83.  
  84. /** 
  85. * @return mixed 
  86. */ 
  87. public function getProductCanonicalLink() 
  88. return $this->productCanonicalLink; 
  89.  
  90. /** 
  91. * @param mixed $productCanonicalLink 
  92. * @return PutProduct 
  93. */ 
  94. public function setProductCanonicalLink($productCanonicalLink) 
  95. $this->productCanonicalLink = $productCanonicalLink; 
  96. return $this; 
  97.