Пример #1
0
 /**
  * @param ShippingManager $shippingManager
  */
 private function stubShipping(ShippingManager $shippingManager)
 {
     foreach ($this->shippingStubs as $planName => $shippingOptions) {
         $shippingPlan = $shippingManager->createShippingPlan($this->shop, ['name' => $planName]);
         foreach ($shippingOptions as $condition => $shippingOption) {
             $shippingManager->createShippingOption($shippingPlan, ['condition' => $condition] + $shippingOption);
         }
     }
 }
 public function destroy(ShippingPlan $plan)
 {
     $this->shippingManager->getShippingPlanRepository()->delete($plan);
     return $this->success('delete');
 }