SuccessfulPayment   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 10
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A subEntities() 0 4 1
1
<?php
2
3
namespace TelegramBot\Entities\Payments;
4
5
use TelegramBot\Entity;
6
7
/**
8
 * Class SuccessfulPayment
9
 *
10
 * This object contains basic information about a successful payment.
11
 *
12
 * @link https://core.telegram.org/bots/api#successfulpayment
13
 *
14
 * @method string    getCurrency()                  Three-letter ISO 4217 currency code
15
 * @method int       getTotalAmount()               Total price in the smallest units of the currency (integer, not float/double).
16
 * @method string    getInvoicePayload()            Bot specified invoice payload
17
 * @method string    getShippingOptionId()          Optional. Identifier of the shipping option chosen by the user
18
 * @method OrderInfo getOrderInfo()                 Optional. Order info provided by the user
19
 * @method string    getTelegramPaymentChargeId()   Telegram payment identifier
20
 * @method string    getProviderPaymentChargeId()   Provider payment identifier
21
 **/
22
class SuccessfulPayment extends Entity
23
{
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    protected function subEntities(): array
29
    {
30
        return [
31
            'order_info' => OrderInfo::class,
32
        ];
33
    }
34
35
}
36