Просмотр исходного кода

fix: ajusta delay para 1 no automatic_anticipation_settings

Gustavo Mantovani 6 часов назад
Родитель
Сommit
155a7f854d

+ 2 - 2
app/Data/Pagarme/Recipient/Parts/Request/AutomaticAnticipationSettingsData.php

@@ -21,8 +21,8 @@ final readonly class AutomaticAnticipationSettingsData extends PagarmeData
             throw new \InvalidArgumentException('automatic_anticipation_settings.volume_percentage deve estar entre 0 e 100.');
         }
 
-        if ($this->delay !== null && $this->delay < 0) {
-            throw new \InvalidArgumentException('automatic_anticipation_settings.delay deve ser maior ou igual a zero.');
+        if ($this->delay !== null && $this->delay < 1) {
+            throw new \InvalidArgumentException('automatic_anticipation_settings.delay deve ser maior ou igual a um.');
         }
     }
 

+ 2 - 2
app/Services/Pagarme/PagarmeRecipientService.php

@@ -78,7 +78,7 @@ class PagarmeRecipientService
                 enabled:          true,
                 type:             'full',
                 volumePercentage: 100,
-                delay:            0,
+                delay:            1,
             ),
         );
 
@@ -117,7 +117,7 @@ class PagarmeRecipientService
                 'enabled'           => true,
                 'type'              => 'full',
                 'volume_percentage' => 100,
-                'delay'             => 0,
+                'delay'             => 1,
             ],
 
             'recipient_metadata' => $metadata,