Skip to content

Commit

Permalink
Added support for expiration fields
Browse files Browse the repository at this point in the history
Added expirationDate and voided fields
  • Loading branch information
Dzamir committed Mar 17, 2014
1 parent 44d08fe commit 6007c74
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion src/Passbook/Pass.php
Expand Up @@ -160,7 +160,17 @@ class Pass implements PassInterface
* @var string
*/
protected $organizationName;

/**
* Date and time when the pass expires. * @var DateTime
*/
protected $expirationDate;

/**
* ndicates that the pass is void—for example, a one time use coupon that has been redeemed. The default value is false. * @var boolean
*/
protected $voided;

public function __construct($serialNumber, $description)
{
// Required
Expand Down Expand Up @@ -194,7 +204,9 @@ public function toArray()
'webServiceURL',
'passTypeIdentifier',
'teamIdentifier',
'organizationName'
'organizationName',
'expirationDate',
'voided'
);
foreach ($properties as $property) {
$method = 'is'.ucfirst($property);
Expand Down Expand Up @@ -599,4 +611,41 @@ public function getOrganizationName()
{
return $this->organizationName;
}

/**
* {@inheritdoc}
*/
public function setExpirationDate(\DateTime $expirationDate)
{
$this->expirationDate = $expirationDate;

return $this;
}

/**
* {@inheritdoc}
*/
public function getExpirationDate()
{
return $this->expirationDate;
}

/**
* {@inheritdoc}
*/
public function setVoided($voided)
{
$this->voided = $voided;

return $this;
}

/**
* {@inheritdoc}
*/
public function getVoided()
{
return $this->voided;
}

}
Expand Down

0 comments on commit 6007c74

Please sign in to comment.