for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PhpCfdi\Finkok\Services\Registration;
use PhpCfdi\Finkok\Definitions\Services;
use PhpCfdi\Finkok\FinkokSettings;
class EditService
{
/** @var FinkokSettings */
private $settings;
public function __construct(FinkokSettings $settings)
$this->settings = $settings;
}
public function settings(): FinkokSettings
return $this->settings;
public function edit(EditCommand $command): EditResult
$soapCaller = $this->settings()->createCallerForService(
Services::registration(),
'reseller_username',
'reseller_password'
);
$rawResponse = $soapCaller->call('edit', array_filter([
'taxpayer_id' => $command->rfc(),
'status' => $command->status()->value(),
'cer' => $command->certificate(),
'key' => $command->privateKey(),
'passphrase' => $command->passPhrase(),
]));
return new EditResult($rawResponse);