Transaction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 19
dl 0
loc 22
rs 10
c 1
b 1
f 0
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
/**
8
 * Class Transaction
9
 *
10
 * @codeCoverageIgnore
11
 * @package Resova\Models
12
 */
13
class Transaction extends Model
14
{
15
    public function allowed(): array
16
    {
17
        return [
18
            'id'                  => 'int',      // The unique id for the transaction object.
19
            'reference'           => 'string',   // The unique reference for the transaction object.
20
            'customer'            => 'Customer', // The primary customer for the transaction, an instance of the customer object.
21
            'price'               => 'float',    // The subtotal price for the transaction.
22
            'fee'                 => 'float',    // The fee value of the transaction.
23
            'discount'            => 'float',    // The total discount value of the transaction.
24
            'tax'                 => 'float',    // The tax value of the transaction.
25
            'total'               => 'float',    // The total for the transaction.
26
            'paid'                => 'float',    // The paid value of the transaction.
27
            'refunded'            => 'float',    // The refunded value of the transaction.
28
            'due'                 => 'float',    // The due value of the transaction.
29
            'overpaid'            => 'boolean',  // True if transaction is overpaid.
30
            'status'              => 'boolean',  // True if transaction is active.
31
            'combined_taxes_fees' => 'array',    // Array of taxes and fees applied to the transaction.
32
            'bookings'            => 'array[Booking]', // Array of bookings applied to the transaction, contains: booking object.
33
            'payments'            => 'array[Booking]', // Array of payments applied to the transaction, contains: payment object.
34
            'promotions'          => 'array[Booking]', // Array of promotions applied to the transaction, contains: promotion object.
35
        ];
36
    }
37
}
38