Skip to content

Commit

Permalink
Merge pull request #34 from discovery-tecnologia/develop
Browse files Browse the repository at this point in the history
Ajustar o mapeamento de Feedback para retornar os objetos Sale e Purchase
  • Loading branch information
dilowagner authored Oct 30, 2019
2 parents decf2fc + 7e1673b commit 56464ef
Show file tree
Hide file tree
Showing 3 changed files with 276 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Resources/Feedback/Feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,48 @@
class Feedback
{
/**
* @var string
* @JMS\Type("string")
* @var Purchase
* @JMS\Type("Dsc\MercadoLivre\Resources\Feedback\Purchase")
*/
private $purchase;

/**
* @var string
* @JMS\Type("string")
* @var Sale
* @JMS\Type("Dsc\MercadoLivre\Resources\Feedback\Sale")
*/
private $sale;

/**
* @return string
* @return Purchase
*/
public function getPurchase()
{
return $this->purchase;
}

/**
* @param string $purchase
* @param Purchase $purchase
* @return Feedback
*/
public function setPurchase($purchase)
public function setPurchase(Purchase $purchase)
{
$this->purchase = $purchase;
return $this;
}

/**
* @return string
* @return Sale
*/
public function getSale()
{
return $this->sale;
}

/**
* @param string $sale
* @param Sale $sale
* @return Feedback
*/
public function setSale($sale)
public function setSale(Sale $sale)
{
$this->sale = $sale;
return $this;
Expand Down
133 changes: 133 additions & 0 deletions src/Resources/Feedback/Purchase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?php
/**
* Class Purchase
*
* @author Diego Wagner <[email protected]>
* http://www.discoverytecnologia.com.br
*/
namespace Dsc\MercadoLivre\Resources\Feedback;

use JMS\Serializer\Annotation as JMS;

class Purchase
{
/**
* @var integer
* @JMS\Type("integer")
*/
private $id;

/**
* @var \DateTime
* @JMS\Type("DateTime<'Y-m-d\TH:i:s.000-04:00'>")
*/
private $dateCreated;

/**
* @var boolean
* @JMS\Type("boolean")
*/
private $fulfilled;

/**
* @var string
* @JMS\Type("string")
*/
private $rating;

/**
* @var string
* @JMS\Type("string")
*/
private $status;

/**
* @return integer
*/
public function getId()
{
return $this->id;
}

/**
* @param integer $id
* @return Purchase
*/
public function setId($id)
{
$this->id = $id;
return $this;
}

/**
* @return \DateTime
*/
public function getDateCreated()
{
return $this->dateCreated;
}

/**
* @param \DateTime $dateCreated
* @return Purchase
*/
public function setDateCreated($dateCreated)
{
$this->dateCreated = $dateCreated;
return $this;
}

/**
* @return boolean
*/
public function isFulfilled()
{
return $this->fulfilled;
}

/**
* @param boolean $value
* @return Purchase
*/
public function setFulfilled($value)
{
$this->fulfilled = $value;
return $this;
}

/**
* @return string
*/
public function getRating()
{
return $this->rating;
}

/**
* @param string $rating
* @return Purchase
*/
public function setRating($rating)
{
$this->rating = $rating;
return $this;
}

/**
* @return string
*/
public function getStatus()
{
return $this->status;
}

/**
* @param string $status
* @return Purchase
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
}
133 changes: 133 additions & 0 deletions src/Resources/Feedback/Sale.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?php
/**
* Class Sale
*
* @author Diego Wagner <[email protected]>
* http://www.discoverytecnologia.com.br
*/
namespace Dsc\MercadoLivre\Resources\Feedback;

use JMS\Serializer\Annotation as JMS;

class Sale
{
/**
* @var integer
* @JMS\Type("integer")
*/
private $id;

/**
* @var \DateTime
* @JMS\Type("DateTime<'Y-m-d\TH:i:s.000-04:00'>")
*/
private $dateCreated;

/**
* @var boolean
* @JMS\Type("boolean")
*/
private $fulfilled;

/**
* @var string
* @JMS\Type("string")
*/
private $rating;

/**
* @var string
* @JMS\Type("string")
*/
private $status;

/**
* @return integer
*/
public function getId()
{
return $this->id;
}

/**
* @param integer $id
* @return Sale
*/
public function setId($id)
{
$this->id = $id;
return $this;
}

/**
* @return \DateTime
*/
public function getDateCreated()
{
return $this->dateCreated;
}

/**
* @param \DateTime $dateCreated
* @return Sale
*/
public function setDateCreated($dateCreated)
{
$this->dateCreated = $dateCreated;
return $this;
}

/**
* @return boolean
*/
public function isFulfilled()
{
return $this->fulfilled;
}

/**
* @param boolean $value
* @return Sale
*/
public function setFulfilled($value)
{
$this->fulfilled = $value;
return $this;
}

/**
* @return string
*/
public function getRating()
{
return $this->rating;
}

/**
* @param string $rating
* @return Sale
*/
public function setRating($rating)
{
$this->rating = $rating;
return $this;
}

/**
* @return string
*/
public function getStatus()
{
return $this->status;
}

/**
* @param string $status
* @return Sale
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
}

0 comments on commit 56464ef

Please sign in to comment.