File tree 2 files changed +11
-2
lines changed
src/BigCommerceLegacyApi/ResourceModels/StoreInformation
tests/BigCommerceLegacyApi/Api/StoreInformation
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 3
3
namespace BigCommerce \ApiV2 \ResourceModels \StoreInformation ;
4
4
5
5
use BigCommerce \ApiV3 \ResourceModels \ResourceModel ;
6
+ use stdClass ;
6
7
7
8
class StoreInformation extends ResourceModel
8
9
{
@@ -37,8 +38,16 @@ class StoreInformation extends ResourceModel
37
38
public string $ plan_name ;
38
39
public string $ plan_level ;
39
40
public string $ industry ;
40
- public object $ logo ;
41
+ public ? object $ logo ;
41
42
public string $ is_price_entered_with_tax ;
42
43
public array $ active_comparison_modules ;
43
44
public object $ features ;
45
+
46
+ public function __construct (?stdClass $ optionObject = null )
47
+ {
48
+ if (isset ($ optionObject ->logo ) && is_array ($ optionObject ->logo )) {
49
+ $ optionObject ->logo = null ;
50
+ }
51
+ parent ::__construct ($ optionObject );
52
+ }
44
53
}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public function testCanGetStoreInformationForStoreWithNoLogo()
34
34
35
35
$ information = $ this ->getApi ()->storeInformation ()->storeInformation ();
36
36
37
- $ this ->assertEquals ('BigCommerce ' , $ information ->name );
37
+ $ this ->assertEquals ('MLITest ' , $ information ->name );
38
38
$ this ->assertNull ($ information ->logo );
39
39
}
40
40
}
You can’t perform that action at this time.
0 commit comments