Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 84141af

Browse files
author
Igor Melnikov
committed
Merge remote-tracking branch 'upstream/2.2-develop' into MAGETWO-69137-upgrade_phpunit-2.2-squash
2 parents 58459d7 + d90957d commit 84141af

File tree

75 files changed

+470
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+470
-0
lines changed

Api/CaseCreationServiceInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Implementation should send request to Signifyd API and create new entity in Magento.
1313
*
1414
* @api
15+
* @since 2.2.0
1516
*/
1617
interface CaseCreationServiceInterface
1718
{
@@ -22,6 +23,7 @@ interface CaseCreationServiceInterface
2223
* @return bool
2324
* @throws \Magento\Framework\Exception\NotFoundException If order does not exists
2425
* @throws \Magento\Framework\Exception\AlreadyExistsException If case for $orderId already exists
26+
* @since 2.2.0
2527
*/
2628
public function createForOrder($orderId);
2729
}

Api/CaseManagementInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* Allows to performs operations with Signifyd cases.
1111
*
1212
* @api
13+
* @since 2.2.0
1314
*/
1415
interface CaseManagementInterface
1516
{
@@ -20,6 +21,7 @@ interface CaseManagementInterface
2021
* @return \Magento\Signifyd\Api\Data\CaseInterface
2122
* @throws \Magento\Framework\Exception\NotFoundException If order does not exists
2223
* @throws \Magento\Framework\Exception\AlreadyExistsException If case for $orderId already exists
24+
* @since 2.2.0
2325
*/
2426
public function create($orderId);
2527

@@ -28,6 +30,7 @@ public function create($orderId);
2830
*
2931
* @param int $orderId
3032
* @return \Magento\Signifyd\Api\Data\CaseInterface|null
33+
* @since 2.2.0
3134
*/
3235
public function getByOrderId($orderId);
3336
}

Api/CaseRepositoryInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Signifyd Case repository interface
1010
*
1111
* @api
12+
* @since 2.2.0
1213
*/
1314
interface CaseRepositoryInterface
1415
{
@@ -17,6 +18,7 @@ interface CaseRepositoryInterface
1718
*
1819
* @param \Magento\Signifyd\Api\Data\CaseInterface $case
1920
* @return \Magento\Signifyd\Api\Data\CaseInterface
21+
* @since 2.2.0
2022
*/
2123
public function save(\Magento\Signifyd\Api\Data\CaseInterface $case);
2224

@@ -25,6 +27,7 @@ public function save(\Magento\Signifyd\Api\Data\CaseInterface $case);
2527
*
2628
* @param int $id
2729
* @return \Magento\Signifyd\Api\Data\CaseInterface
30+
* @since 2.2.0
2831
*/
2932
public function getById($id);
3033

@@ -33,6 +36,7 @@ public function getById($id);
3336
*
3437
* @param int $caseId
3538
* @return \Magento\Signifyd\Api\Data\CaseInterface|null
39+
* @since 2.2.0
3640
*/
3741
public function getByCaseId($caseId);
3842

@@ -41,6 +45,7 @@ public function getByCaseId($caseId);
4145
*
4246
* @param \Magento\Signifyd\Api\Data\CaseInterface $case
4347
* @return bool
48+
* @since 2.2.0
4449
*/
4550
public function delete(\Magento\Signifyd\Api\Data\CaseInterface $case);
4651

@@ -49,6 +54,7 @@ public function delete(\Magento\Signifyd\Api\Data\CaseInterface $case);
4954
*
5055
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
5156
* @return \Magento\Signifyd\Api\Data\CaseSearchResultsInterface
57+
* @since 2.2.0
5258
*/
5359
public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
5460
}

Api/Data/CaseInterface.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*
1313
* @api
1414
* @see https://www.signifyd.com/docs/api/#/reference/cases/retrieve-a-case/get-a-case
15+
* @since 2.2.0
1516
*/
1617
interface CaseInterface
1718
{
@@ -48,6 +49,7 @@ interface CaseInterface
4849
* Returns local case entity identifier.
4950
*
5051
* @return int
52+
* @since 2.2.0
5153
*/
5254
public function getEntityId();
5355

@@ -56,13 +58,15 @@ public function getEntityId();
5658
*
5759
* @param int $id
5860
* @return $this
61+
* @since 2.2.0
5962
*/
6063
public function setEntityId($id);
6164

6265
/**
6366
* Returns Signifyd case identifier.
6467
*
6568
* @return int
69+
* @since 2.2.0
6670
*/
6771
public function getCaseId();
6872

@@ -71,6 +75,7 @@ public function getCaseId();
7175
*
7276
* @param int $id
7377
* @return $this
78+
* @since 2.2.0
7479
*/
7580
public function setCaseId($id);
7681

@@ -79,6 +84,7 @@ public function setCaseId($id);
7984
* Returns null if state of guarantee eligible does not set yet.
8085
*
8186
* @return boolean|null
87+
* @since 2.2.0
8288
*/
8389
public function isGuaranteeEligible();
8490

@@ -87,13 +93,15 @@ public function isGuaranteeEligible();
8793
*
8894
* @param bool $guaranteeEligible
8995
* @return $this
96+
* @since 2.2.0
9097
*/
9198
public function setGuaranteeEligible($guaranteeEligible);
9299

93100
/**
94101
* Returns decision state of the guarantee.
95102
*
96103
* @return string
104+
* @since 2.2.0
97105
*/
98106
public function getGuaranteeDisposition();
99107

@@ -102,13 +110,15 @@ public function getGuaranteeDisposition();
102110
*
103111
* @param string $disposition
104112
* @return $this
113+
* @since 2.2.0
105114
*/
106115
public function setGuaranteeDisposition($disposition);
107116

108117
/**
109118
* Returns case status.
110119
*
111120
* @return string
121+
* @since 2.2.0
112122
*/
113123
public function getStatus();
114124

@@ -117,13 +127,15 @@ public function getStatus();
117127
*
118128
* @param string $status
119129
* @return $this
130+
* @since 2.2.0
120131
*/
121132
public function setStatus($status);
122133

123134
/**
124135
* Returns value, which indicates the likelihood that the order is fraud.
125136
*
126137
* @return int
138+
* @since 2.2.0
127139
*/
128140
public function getScore();
129141

@@ -132,13 +144,15 @@ public function getScore();
132144
*
133145
* @param int $score
134146
* @return $this
147+
* @since 2.2.0
135148
*/
136149
public function setScore($score);
137150

138151
/**
139152
* Get order id for a case.
140153
*
141154
* @return int
155+
* @since 2.2.0
142156
*/
143157
public function getOrderId();
144158

@@ -147,13 +161,15 @@ public function getOrderId();
147161
*
148162
* @param int $orderId
149163
* @return $this
164+
* @since 2.2.0
150165
*/
151166
public function setOrderId($orderId);
152167

153168
/**
154169
* Returns data about a team associated with a case.
155170
*
156171
* @return array
172+
* @since 2.2.0
157173
*/
158174
public function getAssociatedTeam();
159175

@@ -162,13 +178,15 @@ public function getAssociatedTeam();
162178
*
163179
* @param array $team
164180
* @return $this
181+
* @since 2.2.0
165182
*/
166183
public function setAssociatedTeam(array $team);
167184

168185
/**
169186
* Returns disposition of an agent's opinion after reviewing the case.
170187
*
171188
* @return string
189+
* @since 2.2.0
172190
*/
173191
public function getReviewDisposition();
174192

@@ -177,13 +195,15 @@ public function getReviewDisposition();
177195
*
178196
* @param string $disposition
179197
* @return $this
198+
* @since 2.2.0
180199
*/
181200
public function setReviewDisposition($disposition);
182201

183202
/**
184203
* Returns creation datetime for a case.
185204
*
186205
* @return string
206+
* @since 2.2.0
187207
*/
188208
public function getCreatedAt();
189209

@@ -192,13 +212,15 @@ public function getCreatedAt();
192212
*
193213
* @param string $datetime in DATE_ATOM format
194214
* @return $this
215+
* @since 2.2.0
195216
*/
196217
public function setCreatedAt($datetime);
197218

198219
/**
199220
* Returns updating datetime for a case.
200221
*
201222
* @return string
223+
* @since 2.2.0
202224
*/
203225
public function getUpdatedAt();
204226

@@ -207,6 +229,7 @@ public function getUpdatedAt();
207229
*
208230
* @param string $datetime in DATE_ATOM format
209231
* @return $this
232+
* @since 2.2.0
210233
*/
211234
public function setUpdatedAt($datetime);
212235
}

Api/Data/CaseSearchResultsInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
* Retrieve and set list of case entities.
1212
*
1313
* @api
14+
* @since 2.2.0
1415
*/
1516
interface CaseSearchResultsInterface extends SearchResultsInterface
1617
{
1718
/**
1819
* Gets collection of case entities.
1920
*
2021
* @return \Magento\Signifyd\Api\Data\CaseInterface[]
22+
* @since 2.2.0
2123
*/
2224
public function getItems();
2325

@@ -26,6 +28,7 @@ public function getItems();
2628
*
2729
* @param \Magento\Signifyd\Api\Data\CaseInterface[] $items
2830
* @return $this
31+
* @since 2.2.0
2932
*/
3033
public function setItems(array $items);
3134
}

Api/GuaranteeCancelingServiceInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Implementation should send request to Signifyd API and update existing case entity with guarantee information.
1313
*
1414
* @api
15+
* @since 2.2.0
1516
*/
1617
interface GuaranteeCancelingServiceInterface
1718
{
@@ -20,6 +21,7 @@ interface GuaranteeCancelingServiceInterface
2021
*
2122
* @param int $orderId
2223
* @return bool
24+
* @since 2.2.0
2325
*/
2426
public function cancelForOrder($orderId);
2527
}

Api/GuaranteeCreationServiceInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Implementation should send request to Signifyd API and update existing case entity with guarantee infromation.
1313
*
1414
* @api
15+
* @since 2.2.0
1516
*/
1617
interface GuaranteeCreationServiceInterface
1718
{
@@ -20,6 +21,7 @@ interface GuaranteeCreationServiceInterface
2021
*
2122
* @param int $orderId
2223
* @return bool
24+
* @since 2.2.0
2325
*/
2426
public function createForOrder($orderId);
2527
}

Block/Adminhtml/CaseInfo.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,27 @@
1414
* Get Signifyd Case Info
1515
*
1616
* @api
17+
* @since 2.2.0
1718
*/
1819
class CaseInfo extends Template
1920
{
2021
/**
2122
* @var CaseInterface
23+
* @since 2.2.0
2224
*/
2325
private $caseEntity = false;
2426

2527
/**
2628
* @var CaseManagement
29+
* @since 2.2.0
2730
*/
2831
private $caseManagement;
2932

3033
/**
3134
* @param Context $context
3235
* @param CaseManagement $caseManagement
3336
* @param array $data
37+
* @since 2.2.0
3438
*/
3539
public function __construct(
3640
Context $context,
@@ -46,6 +50,7 @@ public function __construct(
4650
* Gets case entity associated with order id.
4751
*
4852
* @return CaseInterface|null
53+
* @since 2.2.0
4954
*/
5055
private function getCaseEntity()
5156
{
@@ -64,6 +69,7 @@ private function getCaseEntity()
6469
* @param mixed $defaultValue
6570
* @param callable $callback
6671
* @return mixed
72+
* @since 2.2.0
6773
*/
6874
private function getCaseProperty($defaultValue, callable $callback)
6975
{
@@ -74,6 +80,7 @@ private function getCaseProperty($defaultValue, callable $callback)
7480
* Checks if case is exists for order
7581
*
7682
* @return bool
83+
* @since 2.2.0
7784
*/
7885
public function isEmptyCase()
7986
{
@@ -84,6 +91,7 @@ public function isEmptyCase()
8491
* Gets case guarantee disposition status.
8592
*
8693
* @return string
94+
* @since 2.2.0
8795
*/
8896
public function getCaseGuaranteeDisposition()
8997
{
@@ -109,6 +117,7 @@ public function getCaseGuaranteeDisposition()
109117
* Retrieves current order Id.
110118
*
111119
* @return integer
120+
* @since 2.2.0
112121
*/
113122
private function getOrderId()
114123
{

0 commit comments

Comments
 (0)