Completed
Push — master ( e96a0c...fa76da )
by Mr
01:59
created

Transaction   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 19
c 1
b 1
f 0
dl 0
loc 22
ccs 0
cts 2
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A allowed() 0 20 1
1
<?php
2
3
namespace Resova\Models;
4
5
use Resova\Model;
6
7
class Transaction extends Model
8
{
9
    public function allowed(): array
10
    {
11
        return [
12
            'id'                  => 'int',      // The unique id for the transaction object.
13
            'reference'           => 'string',   // The unique reference for the transaction object.
14
            'customer'            => 'Customer', // The primary customer for the transaction, an instance of the customer object.
15
            'price'               => 'float',    // The subtotal price for the transaction.
16
            'fee'                 => 'float',    // The fee value of the transaction.
17
            'discount'            => 'float',    // The total discount value of the transaction.
18
            'tax'                 => 'float',    // The tax value of the transaction.
19
            'total'               => 'float',    // The total for the transaction.
20
            'paid'                => 'float',    // The paid value of the transaction.
21
            'refunded'            => 'float',    // The refunded value of the transaction.
22
            'due'                 => 'float',    // The due value of the transaction.
23
            'overpaid'            => 'boolean',  // True if transaction is overpaid.
24
            'status'              => 'boolean',  // True if transaction is active.
25
            'combined_taxes_fees' => 'array',    // Array of taxes and fees applied to the transaction.
26
            'bookings'            => 'array[Booking]', // Array of bookings applied to the transaction, contains: booking object.
27
            'payments'            => 'array[Booking]', // Array of payments applied to the transaction, contains: payment object.
28
            'promotions'          => 'array[Booking]', // Array of promotions applied to the transaction, contains: promotion object.
29
        ];
30
    }
31
}
32