Completed
Push — bot_api_3.0 ( 7bd4af )
by Armando
08:48
created

SuccessfulPayment::subEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
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
15
/**
16
 * Class SuccessfulPayment
17
 *
18
 * This object contains basic information about a successful payment.
19
 *
20
 * @link https://core.telegram.org/bots/api#successfulpayment
21
 *
22
 * @method string    getCurrency()                Three-letter ISO 4217 currency code
23
 * @method int       getTotalAmount()             Total price in the smallest units of the currency (integer, not float/double).
24
 * @method string    getInvoicePayload()          Bot specified invoice payload
25
 * @method string    getShippingOptionId()        Optional. Identifier of the shipping option chosen by the user
26
 * @method OrderInfo getOrderInfo()               Optional. Order info provided by the user
27
 * @method string    getTelegramPaymentChargeId() Telegram payment identifier
28
 * @method string    getProviderPaymentChargeId() Provider payment identifier
29
 **/
30
class SuccessfulPayment extends Entity
31
{
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function subEntities()
36
    {
37
        return [
38
            'order_info' => OrderInfo::class,
39
        ];
40
    }
41
}
42