Skip to content

Commit

Permalink
Merge pull request #120 from amocrm/feature/currency_account_model
Browse files Browse the repository at this point in the history
currency account
  • Loading branch information
bessudnov authored Sep 2, 2020
2 parents 1c2194b + 16ee53d commit 19080f0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/AmoCRM/Models/AccountModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ class AccountModel extends BaseApiModel
/** @var string|null */
protected $country;

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

/**
* @return int
*/
Expand Down Expand Up @@ -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'])
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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
*/
Expand Down

0 comments on commit 19080f0

Please sign in to comment.