This repository was archived by the owner on Oct 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -258,8 +258,8 @@ protected function populate(stdClass $response)
258258 $ customer ->data ->phone ->number = $ this ->getIfSet ('number ' , $ phone );
259259 $ customer ->data ->birthDate = $ this ->getIfSet ('birthDate ' , $ response );
260260 $ customer ->data ->taxDocument = new stdClass ();
261- $ customer ->data ->taxDocument ->type = $ this ->getIfSet ('type ' , $ response -> taxDocument );
262- $ customer ->data ->taxDocument ->number = $ this ->getIfSet ('number ' , $ response -> taxDocument );
261+ $ customer ->data ->taxDocument ->type = $ this ->getIfSet ('type ' , $ this -> getIfSet ( ' taxDocument ' , $ response ) );
262+ $ customer ->data ->taxDocument ->number = $ this ->getIfSet ('number ' , $ this -> getIfSet ( ' taxDocument ' , $ response ) );
263263 $ customer ->data ->addresses = [];
264264 $ customer ->data ->shippingAddress = $ this ->getIfSet ('shippingAddress ' , $ response );
265265 $ customer ->data ->billingAddress = $ this ->getIfSet ('billingAddress ' , $ response );
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ protected function populate(stdClass $response)
161161 $ this ->orders ->data ->events = $ this ->structure ($ response , Event::PATH , Event::class);
162162
163163 $ this ->orders ->data ->items = $ response ->items ;
164- $ this ->orders ->data ->receivers = $ response -> receivers ;
164+ $ this ->orders ->data ->receivers = $ this -> getIfSet ( ' receivers ' , $ response ) ;
165165 $ this ->orders ->data ->createdAt = $ response ->createdAt ;
166166 $ this ->orders ->data ->status = $ response ->status ;
167167 $ this ->orders ->data ->_links = $ response ->_links ;
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ public function testCustomerCreate()
4747 $ this ->assertEquals ($ customer_original ->getFullname (), $ customer ->getFullname ());
4848 $ this ->assertEquals ($ customer_original ->getPhoneNumber (), $ customer ->getPhoneNumber ());
4949 $ this ->assertEquals ($ customer_original ->getBirthDate (), $ customer ->getBirthDate ());
50+ $ this ->assertEquals ($ customer_original ->getTaxDocumentType (), $ customer ->getTaxDocumentType ());
51+ $ this ->assertEquals ($ customer_original ->getTaxDocumentNumber (), $ customer ->getTaxDocumentNumber ());
5052 }
5153
5254 /**
You can’t perform that action at this time.
0 commit comments