Completed
Push — master ( e7303e...8fbc07 )
by Armando
02:05 queued 25s
created

PreCheckoutQuery::subEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * This file is part of the TelegramBot package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Longman\TelegramBot\Entities\Payments;
12
13
use Longman\TelegramBot\Entities\Entity;
14
use Longman\TelegramBot\Entities\User;
15
16
/**
17
 * Class PreCheckoutQuery
18
 *
19
 * This object contains information about an incoming pre-checkout query.
20
 *
21
 * @link https://core.telegram.org/bots/api#precheckoutquery
22
 *
23
 * @method string    getId()               Unique query identifier
24
 * @method User      getFrom()             User who sent the query
25
 * @method string    getCurrency()         Three-letter ISO 4217 currency code
26
 * @method int       getTotalAmount()      Total price in the smallest units of the currency (integer, not float/double).
27
 * @method string    getInvoicePayload()   Bot specified invoice payload
28
 * @method string    getShippingOptionId() Optional. Identifier of the shipping option chosen by the user
29
 * @method OrderInfo getOrderInfo()        Optional. Order info provided by the user
30
 **/
31
class PreCheckoutQuery extends Entity
32
{
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function subEntities()
37
    {
38
        return [
39
            'user'       => User::class,
40
            'order_info' => OrderInfo::class,
41
        ];
42
    }
43
}
44