Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | protected function convertToObject($data) |
||
42 | { |
||
43 | $this->id = $data['id']; |
||
44 | $this->type = $data['type']; |
||
45 | $this->amount = number_format($data['attributes']['amount'] / 100, 2); |
||
46 | $this->currency = $data['attributes']['currency'] ?? 'PHP'; |
||
47 | $this->description = $data['attributes']['description']; |
||
48 | $this->external_reference_number = $data['attributes']['external_reference_number']; |
||
49 | $this->fee = $data['attributes']['fee']; |
||
50 | $this->net_amount = $data['attributes']['net_amount']; |
||
51 | $this->statement_descriptor = $data['attributes']['statement_descriptor']; |
||
52 | $this->status = $data['attributes']['status']; |
||
53 | $this->source = new PaymentSource($data['attributes']['source']); |
||
54 | $this->created_at = $data['attributes']['created_at']; |
||
55 | $this->updated_at = $data['attributes']['updated_at']; |
||
56 | $this->paid_at = $data['attributes']['paid_at']; |
||
57 | $this->payout = $data['attributes']['payout']; |
||
58 | $this->access_url = $data['attributes']['access_url']; |
||
59 | $this->billing = $data['attributes']['billing']; |
||
60 | |||
61 | return $this; |
||
62 | } |
||
63 | } |
||
64 |