We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<?php namespace CodebarAg\DocuWare\Requests\Documents\ModifyDocuments; use CodebarAg\DocuWare\Responses\Documents\ModifyDocuments\TransferDocumentResponse; use Saloon\Contracts\Body\HasBody; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Http\Response; use Saloon\Traits\Body\HasJsonBody; class TransferDocument extends Request implements HasBody { use HasJsonBody; protected Method $method = Method::POST; public function __construct( protected readonly string $fileCabinetId, protected readonly string $destinationFileCabinetId, protected readonly string $storeDialogId, protected readonly string $documentId, protected readonly array $fields = [], ) {} public function resolveEndpoint(): string { return '/FileCabinets/'.$this->destinationFileCabinetId.'/Task/Transfer'; } protected function defaultHeaders(): array { return [ 'Accept' => 'application/json', 'Content-Type' => 'application/vnd.docuware.platform.documentstransferinfo+json', 'X-Requested-With' => 'XMLHttpRequest', ]; } protected function defaultBody(): array { return [ 'SourceFileCabinetId' => $this->fileCabinetId, 'Documents' => [ [ 'Id' => $this->documentId, 'Fields' => $this->fields, ], ], 'KeepSource' => false, 'FillIntellix' => false, 'UseDefaultDialog' => false, ]; } public function createDtoFromResponse(Response $response): bool { return TransferDocumentResponse::fromResponse($response); } }
'KeepSource' => false, 'FillIntellix' => false, 'UseDefaultDialog' => false,
<?php namespace CodebarAg\DocuWare\Requests\Documents\UpdateIndexValues; use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\PrepareDTO; use CodebarAg\DocuWare\Exceptions\UnableToUpdateFields; use CodebarAg\DocuWare\Responses\Documents\UpdateIndexValues\UpdateIndexValuesResponse; use Illuminate\Support\Collection; use Saloon\Contracts\Body\HasBody; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Http\Response; use Saloon\Traits\Body\HasJsonBody; class UpdateIndexValues extends Request implements HasBody { use HasJsonBody; protected Method $method = Method::PUT; /** * @throws UnableToUpdateFields */ public function __construct( protected readonly string $fileCabinetId, protected readonly string $documentId, protected readonly ?Collection $indexes = null, protected readonly bool $forceUpdate = false, ) {} public function resolveEndpoint(): string { return '/FileCabinets/'.$this->fileCabinetId.'/Documents/'.$this->documentId.'/Fields'; } public function defaultBody(): array { $body = []; if ($this->indexes) { $bodyEncode = json_encode(PrepareDTO::makeField($this->indexes)); $bodyDecode = json_decode($bodyEncode, true); $body = $bodyDecode; } return $body; } public function createDtoFromResponse(Response $response): Collection { return UpdateIndexValuesResponse::fromResponse($response); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Question or Feature?
The text was updated successfully, but these errors were encountered: