AnswerPreCheckoutQuery::getPreCheckoutQueryId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types\Payments\Query;
4
5
use TelegramBot\Api\BaseType;
6
7
/**
8
 * Class AnswerPreCheckoutQuery
9
 * Use this method to respond to such pre-checkout queries.
10
 *
11
 * @package TelegramBot\Api\Types\Payments\Query
12
 */
13
class AnswerPreCheckoutQuery extends BaseType
14
{
15
    /**
16
     * @var array
17
     */
18
    protected static $requiredParams = ['pre_checkout_query_id', 'ok'];
19
20
    /**
21
     * @var array
22
     */
23
    protected static $map = [
24
        'pre_checkout_query_id' => true,
25
        'ok' => true,
26
        'error_message' => true,
27
    ];
28
29
    /**
30
     * Unique identifier for the query to be answered
31
     *
32
     * @var string
33
     */
34
    protected $preCheckoutQueryId;
35
36
    /**
37
     * Specify True if everything is alright
38
     *
39
     * @var bool
40
     */
41
    protected $ok;
42
43
    /**
44
     * Error message in human readable form that explains the reason for failure to proceed with the checkout
45
     *
46
     * @var string
47
     */
48
    protected $errorMessage;
49
50
    /**
51
     * @author MY
52
     * @return bool
53
     */
54
    public function getOk()
55
    {
56
        return $this->ok;
57
    }
58
59
    /**
60
     * @author MY
61
     *
62
     * @param bool $ok
63
     *
64
     * @return void
65
     */
66
    public function setOk($ok)
67
    {
68
        $this->ok = $ok;
69
    }
70
71
    /**
72
     * @author MY
73
     * @return string
74
     */
75
    public function getErrorMessage()
76
    {
77
        return $this->errorMessage;
78
    }
79
80
    /**
81
     * @author MY
82
     *
83
     * @param string $errorMessage
84
     *
85
     * @return void
86
     */
87
    public function setErrorMessage($errorMessage)
88
    {
89
        $this->errorMessage = $errorMessage;
90
    }
91
92
    /**
93
     * @author MY
94
     * @return string
95
     */
96
    public function getPreCheckoutQueryId()
97
    {
98
        return $this->preCheckoutQueryId;
99
    }
100
101
    /**
102
     * @author MY
103
     *
104
     * @param string $preCheckoutQueryId
105
     *
106
     * @return void
107
     */
108
    public function setPreCheckoutQueryId($preCheckoutQueryId)
109
    {
110
        $this->preCheckoutQueryId = $preCheckoutQueryId;
111
    }
112
}
113