File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -124,8 +124,7 @@ public function setDocument($document)
124124 {
125125 $ this ->document = $ this ->formatDocument ($ document );
126126
127- if (empty ($ this ->document )) {
128-
127+ if (empty ($ this ->document ) && empty ($ this ->getPagarmeId ())) {
129128 $ inputName = $ this ->i18n ->getDashboard ('document ' );
130129 $ message = $ this ->i18n ->getDashboard (
131130 "The %s should not be empty! " ,
@@ -228,8 +227,11 @@ public function convertToSDKRequest()
228227 $ customerRequest ->code = $ this ->getCode ();
229228 $ customerRequest ->name = $ this ->getName ();
230229 $ customerRequest ->email = $ this ->getEmail ();
231- $ customerRequest ->document = $ this ->getDocument ();
232- $ customerRequest ->type = $ this ->getTypeValue ();
230+ if ($ this ->getDocument ()) {
231+ $ customerRequest ->document = $ this ->getDocument ();
232+ $ customerRequest ->type = $ this ->getTypeValue ();
233+ }
234+
233235 $ customerRequest ->address = $ this ->getAddressToSDK ();
234236 $ customerRequest ->phones = $ this ->getPhonesToSDK ();
235237
You can’t perform that action at this time.
0 commit comments