This repository was archived by the owner on Oct 15, 2024. It is now read-only.
Commit 6f6c10b 1 parent 3dfa2a6 commit 6f6c10b Copy full SHA for 6f6c10b
File tree 3 files changed +5
-3
lines changed
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)
258
258
$ customer ->data ->phone ->number = $ this ->getIfSet ('number ' , $ phone );
259
259
$ customer ->data ->birthDate = $ this ->getIfSet ('birthDate ' , $ response );
260
260
$ 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 ) );
263
263
$ customer ->data ->addresses = [];
264
264
$ customer ->data ->shippingAddress = $ this ->getIfSet ('shippingAddress ' , $ response );
265
265
$ 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)
161
161
$ this ->orders ->data ->events = $ this ->structure ($ response , Event::PATH , Event::class);
162
162
163
163
$ this ->orders ->data ->items = $ response ->items ;
164
- $ this ->orders ->data ->receivers = $ response -> receivers ;
164
+ $ this ->orders ->data ->receivers = $ this -> getIfSet ( ' receivers ' , $ response ) ;
165
165
$ this ->orders ->data ->createdAt = $ response ->createdAt ;
166
166
$ this ->orders ->data ->status = $ response ->status ;
167
167
$ this ->orders ->data ->_links = $ response ->_links ;
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ public function testCustomerCreate()
47
47
$ this ->assertEquals ($ customer_original ->getFullname (), $ customer ->getFullname ());
48
48
$ this ->assertEquals ($ customer_original ->getPhoneNumber (), $ customer ->getPhoneNumber ());
49
49
$ this ->assertEquals ($ customer_original ->getBirthDate (), $ customer ->getBirthDate ());
50
+ $ this ->assertEquals ($ customer_original ->getTaxDocumentType (), $ customer ->getTaxDocumentType ());
51
+ $ this ->assertEquals ($ customer_original ->getTaxDocumentNumber (), $ customer ->getTaxDocumentNumber ());
50
52
}
51
53
52
54
/**
You can’t perform that action at this time.
0 commit comments