Skip to content

Commit

Permalink
add addSaleschannel method
Browse files Browse the repository at this point in the history
  • Loading branch information
lexsmil committed Nov 4, 2024
1 parent f9e26cc commit 6900817
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 6900817

Please sign in to comment.