Completed
Push — master ( bba0ca...8b0d2a )
by Mr
02:55
created

Hold::allowed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Bookeo\Models;
4
5
use Bookeo\Model;
6
7
/**
8
 * Class Hold
9
 *
10
 * @codeCoverageIgnore
11
 * @package Bookeo\Models
12
 */
13
class Hold extends Model
14
{
15
    /**
16
     * List of allowed fields
17
     *
18
     * @return array
19
     */
20
    public function allowed(): array
21
    {
22
        return [
23
            'id'                          => 'string',          // [read-only],
24
            'price'                       => 'Price',           // The total price for the booking [read-only],
25
            'totalPayable'                => 'Money',           // The total amount payable now. This is the total gross price less any applicable credit [read-only],
26
            'expiration'                  => 'string:datetime', // The time at which this hold will expire [read-only],
27
            'applicableMoneyCredit'       => 'Money',           // Existing customers can have a "store credit" that Bookeo uses automatically to pay for purchases. This field indicates the credit that would be applied to the booking if it was saved. This field is present only if the hold is being made on behalf of an existing customer. New customers cannot have pre-existing credit [read-only],
28
            'applicableGiftVoucherCredit' => 'Money',           // Indicates the credit resulting from money gift vouchers that would be applied to the booking if it was saved. This field is present only if some credit is applicable (from a gift voucher being redeemed at this time, or from previous unused gift vouchers if this booking is for an existing customer) [read-only],
29
            'applicablePrepaidCredits'    => 'integer',         // Indicates the number of prepaid credits that would be applied to the booking if it was saved. Note that if prepaid credits are applicable, the total price would be reduced, and possibly be 0 if the credit can pay for the entire booking. This field is present only if the hold is being made on behalf of an existing customer. New customers cannot have pre-existing credit [read-only]
30
        ];
31
    }
32
}
33