Skip to content

Commit

Permalink
add operations to entity
Browse files Browse the repository at this point in the history
  • Loading branch information
vodnicearv committed Jul 12, 2021
1 parent c449722 commit c081fc0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Components/MutationBuilders/AbstractMutationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,24 @@ public function __construct(AbstractEntity &$entity){
$this->e = $entity;
}

public function addOperation($linkedSum, AbstractEntity $entity)
{
$this->e->fields->operations = [
[
'meta' => $entity->getMeta(),
'linkedSum' => $linkedSum * 100
]
];

return $this;
}

public function setSum($sum)
{
$this->e->fields->sum = $sum * 100;
return $this;
}

/**
* @param Account $account
* @param LinkingSpecs|null $specs
Expand Down

0 comments on commit c081fc0

Please sign in to comment.