Skip to content

[ADD] price with minor units param#620

Merged
bessudnov merged 2 commits into
amocrm:masterfrom
rasa04:cents
Apr 13, 2026
Merged

[ADD] price with minor units param#620
bessudnov merged 2 commits into
amocrm:masterfrom
rasa04:cents

Conversation

@rasa04

@rasa04 rasa04 commented Dec 18, 2025

Copy link
Copy Markdown

No description provided.

@rasa04
rasa04 force-pushed the cents branch 2 times, most recently from e0baa7b to 1869540 Compare March 3, 2026 11:40
@rasa04

rasa04 commented Mar 3, 2026

Copy link
Copy Markdown
Author
image

@rasa04

rasa04 commented Mar 3, 2026

Copy link
Copy Markdown
Author
image

* @param int|float|null $price
*/
public function setPrice(?int $price): self
public function setPrice($price): self

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно добавить проверку на типы внутри метода, если убираем тип

public function testToApiUsesNumericPriceFieldForIntegerInput(): void
{
$this->assertSame(
['price' => 100.0, 'request_id' => '0'],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

добавь тесты, если строку передадут, массив и тд)

@rasa04

rasa04 commented Apr 13, 2026

Copy link
Copy Markdown
Author
image

return isset($this->price) ? (int)$this->price : null;
}

public function getPriceWithMinorUnits(): ?float

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужен коммент, что в данный момент это только для kommo

а также поднять версию либы, там была константа
1.16.0 поставить

@jamoliddin05

Copy link
Copy Markdown
image image image

@bessudnov
bessudnov merged commit 3ff518e into amocrm:master Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants