| Conditions | 2 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | public function __construct(ClubCollectApiClient $client, array $response) |
||
| 51 | { |
||
| 52 | parent::__construct($client); |
||
| 53 | |||
| 54 | try |
||
| 55 | { |
||
| 56 | $this->amountCents = Cast::toManInt($response['amount_cents']); |
||
| 57 | $this->date = Cast::toManDateTime($response['date']); |
||
| 58 | $this->description = Cast::toOptString($response['description']); |
||
| 59 | $this->invoiceLineId = Cast::toManString($response['invoice_line_id']); |
||
| 60 | $this->type = Cast::toManString($response['type']); |
||
| 61 | } |
||
| 62 | catch (\Throwable $exception) |
||
| 63 | { |
||
| 64 | throw new ClubCollectApiException([$exception], 'Failed to create an invoice line'); |
||
| 65 | } |
||
| 72 |