Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
approved_case.php
Go to the documentation of this file.
1 <?php
9 use Magento\Signifyd\Api\Data\CaseInterfaceFactory;
10 
11 require __DIR__ . '/order_with_customer_and_two_simple_products.php';
12 
14 $caseFactory = $objectManager->get(CaseInterfaceFactory::class);
15 
17  'teamName' => 'Some Team',
18  'teamId' => 123,
19  'getAutoDismiss' => true,
20  'getTeamDismissalDays' => 3
21 ];
22 
24 $case = $caseFactory->create();
25 $case->setCaseId(123)
26  ->setGuaranteeEligible(false)
27  ->setGuaranteeDisposition(CaseInterface::GUARANTEE_APPROVED)
28  ->setStatus(CaseInterface::STATUS_PROCESSING)
29  ->setScore(553)
30  ->setOrderId($order->getEntityId())
31  ->setAssociatedTeam($associatedTeam)
32  ->setReviewDisposition(CaseInterface::DISPOSITION_GOOD)
33  ->setCreatedAt('2016-12-12T15:17:17+0000')
34  ->setUpdatedAt('2016-12-12T19:23:16+0000');
35 
37 $caseRepository = $objectManager->get(CaseRepositoryInterface::class);
38 $caseRepository->save($case);
$objectManager
Definition: bootstrap.php:17
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
$case
$order
Definition: order.php:55
$caseRepository
$caseFactory
$associatedTeam