Completed
Push — master ( 7bbbc8...a7367f )
by Mr
01:59
created

Payment   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 26
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A allowed() 0 18 1
1
<?php
2
3
namespace Bookeo\Models;
4
5
use Bookeo\Model;
6
7
class Payment extends Model
8
{
9
    /**
10
     * List of allowed fields
11
     *
12
     * @return array
13
     */
14
    public function allowed(): array
15
    {
16
        return [
17
            'id'                 => 'string',
18
            'creationTime'       => 'string:datetime', // When this record was created
19
            'receivedTime'       => 'string:datetime', //  When this payment was received
20
            'reason'             => 'string', // Reason for the payment. Shown to customer where appropriate. Ex. "Deposit", "Balance payment", "Additional fee", etc,
21
            'description'        => 'string', // Indicates what the payment was for (ex. "Booking 1234", "Prepaid package ABC", "Gift voucher XYZ")
22
            'comment'            => 'string', // An optional comment tracked with the payment. Not shown to customers.
23
            'amount'             => 'Money',  // The payment amount
24
            'paymentMethod'      => 'string', // ['creditCard' or 'paypal' or 'bankTransfer' or 'cash' or 'checque' or 'debitCard' or 'existingCredit' or 'accountCredit' or 'moneyVoucher' or 'other']
25
            'paymentMethodOther' => 'string', // If paymentMethod is 'other', this field is required, and it specifies what other method was used,
26
            'agent'              => 'string', // Who registered this payment. If this field is not present, it means that the customer paid online on Bookeo's booking page
27
            'customerId'         => 'string', // The id of customer associated with this payment
28
            'gatewayName'        => 'string', // The name of the payment gateway that processed the payment (if it was processed by a payment gateway)
29
            'transactionId'      => 'string', // The transaction number/id as provided by the payment gateway that processed the payment - if any
30
        ];
31
    }
32
}
33