WagnerMontanini /
apinfefasa
| 1 | <?php |
||
| 2 | |||
| 3 | namespace WagnerMontanini\ApiNfeFasa; |
||
| 4 | |||
| 5 | use WagnerMontanini\ApiNfeFasa\Companies; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Class ProductInvoices |
||
| 9 | * @package WagnerMontanini\ApiNfeFasa |
||
| 10 | */ |
||
| 11 | class ProductInvoices extends ApiNfeFasa |
||
| 12 | { |
||
| 13 | /** @var array */ |
||
| 14 | private $headers; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 15 | |||
| 16 | /** |
||
| 17 | * ProductInvoices constructor |
||
| 18 | * @param string $apiUrl |
||
| 19 | * @param string $token |
||
| 20 | * @param string $company_id |
||
| 21 | */ |
||
| 22 | public function __construct(string $apiUrl, string $token, string $company_id) |
||
| 23 | { |
||
| 24 | parent::__construct($apiUrl, $token); |
||
| 25 | $this->company = $company_id; |
||
|
0 ignored issues
–
show
|
|||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $access_key |
||
| 30 | * @return ProductInvoices |
||
| 31 | */ |
||
| 32 | public function read(string $access_key): ProductInvoices |
||
| 33 | { |
||
| 34 | $this->request( |
||
| 35 | "GET", |
||
| 36 | "/companies/{$this->company}/productinvoices/{$access_key}", |
||
| 37 | ); |
||
| 38 | |||
| 39 | return $this; |
||
| 40 | } |
||
| 41 | } |