Skip to content

Commit

Permalink
currency symbol for release
Browse files Browse the repository at this point in the history
  • Loading branch information
bessudnov committed Dec 3, 2020
1 parent f2e0abc commit 25dd939
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/AmoCRM/EntitiesServices/Traits/PageMethodsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ trait PageMethodsTrait
* @return HasPagesInterface
* @throws AmoCRMApiException
* @throws AmoCRMoAuthApiException
* @throws AmoCRMApiPageNotAvailableException
*/
public function nextPage(HasPagesInterface $collection): HasPagesInterface
{
Expand All @@ -45,6 +46,7 @@ public function nextPage(HasPagesInterface $collection): HasPagesInterface
* @return HasPagesInterface
* @throws AmoCRMApiException
* @throws AmoCRMoAuthApiException
* @throws AmoCRMApiPageNotAvailableException
*/
public function prevPage(HasPagesInterface $collection): HasPagesInterface
{
Expand Down
25 changes: 25 additions & 0 deletions src/AmoCRM/Models/AccountModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ class AccountModel extends BaseApiModel
/** @var string|null */
protected $currency;

/** @var string|null */
protected $currencySymbol;

/**
* @return int
*/
Expand Down Expand Up @@ -319,6 +322,7 @@ public static function fromArray(array $account): self
->setCurrentUserId((int)$account['current_user_id'])
->setCountry((string)$account['country'])
->setCurrency((string)$account['currency'])
->setCurrencySymbol((string)$account['currency_symbol'])
->setUnsortedOn((bool)$account['is_unsorted_on'])
->setMobileFeatureVersion((int)$account['mobile_feature_version'])
->setCustomersMode($account['customers_mode'])
Expand Down Expand Up @@ -392,6 +396,7 @@ public function toArray(): array
'current_user_id' => $this->getCurrentUserId(),
'country' => $this->getCountry(),
'currency' => $this->getCurrency(),
'currency_symbol' => $this->getCurrencySymbol(),
'is_unsorted_on' => $this->getIsUnsortedOn(),
'mobile_feature_version' => $this->getMobileFeatureVersion(),
'customers_mode' => $this->getCustomersMode(),
Expand Down Expand Up @@ -699,6 +704,26 @@ public function setCurrency(?string $currency): AccountModel
return $this;
}

/**
* @return string|null
*/
public function getCurrencySymbol(): ?string
{
return $this->currencySymbol;
}

/**
* @param string|null $currencySymbol
*
* @return AccountModel
*/
public function setCurrencySymbol(?string $currencySymbol): AccountModel
{
$this->currencySymbol = $currencySymbol;

return $this;
}

/**
* @return array
*/
Expand Down

0 comments on commit 25dd939

Please sign in to comment.