Skip to content

Commit dcb379b

Browse files
committed
fix tests
1 parent 39322e2 commit dcb379b

File tree

2 files changed

+87
-2
lines changed

2 files changed

+87
-2
lines changed

src/DTO/V2/ProductDTO.php

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?php
2+
3+
4+
namespace Mindbox\DTO\V2;
5+
6+
/**
7+
* Trait ProductDTO
8+
*
9+
* @package Mindbox\DTO\V3
10+
* @property string $price
11+
* @property string $name
12+
* @property string $description
13+
* @property string $isAvailable
14+
* @property string $oldPrice
15+
* @property string $shelfLife
16+
* @property string $url
17+
* @property string $pictureUrl
18+
* @property array $customFields
19+
**/
20+
trait ProductDTO
21+
{
22+
/**
23+
* @return string
24+
*/
25+
public function getPrice()
26+
{
27+
return $this->getField('price');
28+
}
29+
30+
/**
31+
* @return string
32+
*/
33+
public function getName()
34+
{
35+
return $this->getField('name');
36+
}
37+
38+
/**
39+
* @return string
40+
*/
41+
public function getDescription()
42+
{
43+
return $this->getField('description');
44+
}
45+
46+
/**
47+
* @return string
48+
*/
49+
public function getIsAvailable()
50+
{
51+
return $this->getField('isAvailable');
52+
}
53+
54+
/**
55+
* @return string
56+
*/
57+
public function getOldPrice()
58+
{
59+
return $this->getField('oldPrice');
60+
}
61+
62+
/**
63+
* @return string
64+
*/
65+
public function getShelfLife()
66+
{
67+
return $this->getField('shelfLife');
68+
}
69+
70+
/**
71+
* @return string
72+
*/
73+
public function getUrl()
74+
{
75+
return $this->getField('url');
76+
}
77+
78+
/**
79+
* @return string
80+
*/
81+
public function getPictureUrl()
82+
{
83+
return $this->getField('pictureUrl');
84+
}
85+
}

src/Helpers/CustomerHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function checkByMail(CustomerRequestDTO $customer, $operationName, $addDe
9595
*
9696
* @return \Mindbox\Clients\AbstractMindboxClient
9797
*/
98-
public function register(CustomerRequestDTO $customer, $operationName, $addDeviceUUID = true, $isSync = false)
98+
public function register(CustomerRequestDTO $customer, $operationName, $addDeviceUUID = true, $isSync = true)
9999
{
100100
$operation = $this->createOperation();
101101
$operation->setCustomer($customer);
@@ -114,7 +114,7 @@ public function register(CustomerRequestDTO $customer, $operationName, $addDevic
114114
*
115115
* @return \Mindbox\Clients\AbstractMindboxClient
116116
*/
117-
public function edit(CustomerRequestDTO $customer, $operationName, $addDeviceUUID = true, $isSync = false)
117+
public function edit(CustomerRequestDTO $customer, $operationName, $addDeviceUUID = true, $isSync = true)
118118
{
119119
$operation = $this->createOperation();
120120
$operation->setCustomer($customer);

0 commit comments

Comments
 (0)