Skip to content

Commit

Permalink
Merge pull request #111 from lexsmil/master
Browse files Browse the repository at this point in the history
add addSaleschannel method
  • Loading branch information
tooyz authored Nov 4, 2024
2 parents f9e26cc + 6900817 commit 4fc102f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Components/MutationBuilders/AbstractMutationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
use MoySklad\Entities\Products\Variant;
use MoySklad\Entities\Project;
use MoySklad\Entities\RetailStore;
use MoySklad\Entities\Saleschannel;
use MoySklad\Entities\Store;
use MoySklad\Entities\Uom;
use MoySklad\Entities\Bonusprogram;
Expand Down Expand Up @@ -237,6 +238,17 @@ public function addRetailStore(RetailStore $retailStore, LinkingSpecs $specs = n
return $this->simpleLink($retailStore, $specs);
}

/**
* @param Saleschannel $saleschannel
* @param LinkingSpecs|null $specs
* @return AbstractMutationBuilder
* @throws \Exception
*/
public function addSaleschannel(Saleschannel $saleschannel, LinkingSpecs $specs = null){
return $this->simpleLink($saleschannel, $specs, LinkingSpecs::create([
"name" => "salesChannel"
]));
}
/**
* @param Store $store
* @param LinkingSpecs|null $specs
Expand Down

0 comments on commit 4fc102f

Please sign in to comment.