Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #17 from jonasdekeukelaere/add-disabled-client
Browse files Browse the repository at this point in the history
Add disabled parameter to client
  • Loading branch information
jonasdekeukelaere authored Mar 14, 2018
2 parents 7953aa1 + 4690c23 commit 2c7c7f2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Client
/**
* @var bool
*/
protected $invoiceableByEmail, $invoiceableBySnailMail, $invoiceableByFactr;
protected $invoiceableByEmail, $invoiceableBySnailMail, $invoiceableByFactr, $disabled = false;

/**
* @param \SumoCoders\Factr\Client\Address $billingAddress
Expand Down Expand Up @@ -356,6 +356,16 @@ public function setReplacedById($replacedById)
$this->replacedById = $replacedById;
}

public function isDisabled()
{
return $this->disabled;
}

public function setDisabled($disabled = true)
{
$this->disabled = $disabled;
}

/**
* Initialize the object with raw data
*
Expand Down Expand Up @@ -392,6 +402,7 @@ public static function initializeWithRawData($data)
if(isset($data['payment_days'])) $item->setPaymentDays($data['payment_days']);
if(isset($data['remarks'])) $item->setRemarks($data['remarks']);
if(isset($data['replaced_by_id'])) $item->setReplacedById($data['replaced_by_id']);
if(isset($data['disabled_at']) && !empty($data['disabled_at'])) $item->setDisabled();

return $item;
}
Expand Down

0 comments on commit 2c7c7f2

Please sign in to comment.