Skip to content

Commit

Permalink
Manifest method
Browse files Browse the repository at this point in the history
  • Loading branch information
zgrguric committed Nov 4, 2023
1 parent 644d071 commit 39402f7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/Api/Methods/Manifest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php declare(strict_types=1);

namespace XRPLWin\XRPL\Api\Methods;

use XRPLWin\XRPL\Api\AbstractMethod;
use XRPLWin\XRPL\Exceptions\NotSentException;
use XRPLWin\XRPL\Exceptions\XRPL\NotSuccessException;

class Manifest extends AbstractMethod
{
protected string $method = 'manifest';
protected string $endpoint_config_key = 'endpoint_reporting_uri';

/**
* Returns manifest.
* @return stdClass
* @throws NotExecutedException
*/
public function finalResult(): \stdClass
{
if(!$this->executed)
throw new NotSentException('Please send request first');

if(!$this->isSuccess())
throw new NotSuccessException('Request did not return success result');

return $this->result()->result;
}
}

0 comments on commit 39402f7

Please sign in to comment.