From 16ee53d25681f6feb3420898d9f4b804a3826353 Mon Sep 17 00:00:00 2001 From: Nikita Date: Wed, 2 Sep 2020 00:46:55 +0300 Subject: [PATCH] currecny account --- src/AmoCRM/Models/AccountModel.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/AmoCRM/Models/AccountModel.php b/src/AmoCRM/Models/AccountModel.php index ec7a29d3..c06f41fb 100644 --- a/src/AmoCRM/Models/AccountModel.php +++ b/src/AmoCRM/Models/AccountModel.php @@ -121,6 +121,9 @@ class AccountModel extends BaseApiModel /** @var string|null */ protected $country; + /** @var string|null */ + protected $currency; + /** * @return int */ @@ -315,6 +318,7 @@ public static function fromArray(array $account): self ->setUpdatedAt($account['updated_at']) ->setCurrentUserId((int)$account['current_user_id']) ->setCountry((string)$account['country']) + ->setCountry((string)$account['currency']) ->setUnsortedOn((bool)$account['is_unsorted_on']) ->setMobileFeatureVersion((int)$account['mobile_feature_version']) ->setCustomersMode($account['customers_mode']) @@ -387,6 +391,7 @@ public function toArray(): array 'updated_by' => $this->getUpdatedBy(), 'current_user_id' => $this->getCurrentUserId(), 'country' => $this->getCountry(), + 'currency' => $this->getCurrency(), 'is_unsorted_on' => $this->getIsUnsortedOn(), 'mobile_feature_version' => $this->getMobileFeatureVersion(), 'customers_mode' => $this->getCustomersMode(), @@ -674,6 +679,26 @@ public function setCountry(?string $country): self return $this; } + /** + * @return string|null + */ + public function getCurrency(): ?string + { + return $this->currency; + } + + /** + * @param string|null $currency + * + * @return AccountModel + */ + public function setCurrency(?string $currency): AccountModel + { + $this->currency = $currency; + + return $this; + } + /** * @return array */