Code Duplication    Length = 195-195 lines in 2 locations

src/Types/Payments/Query/PreCheckoutQuery.php 1 location

@@ 17-211 (lines=195) @@
14
 *
15
 * @package TelegramBot\Api\Types\Payments\Query
16
 */
17
class PreCheckoutQuery extends BaseType
18
{
19
    /**
20
     * @var array
21
     */
22
    static protected $requiredParams = ['id', 'from', 'currency', 'total_amount', 'invoice_payload'];
23
24
    /**
25
     * @var array
26
     */
27
    static protected $map = [
28
        'id' => true,
29
        'from' => User::class,
30
        'currency' => true,
31
        'total_amount' => true,
32
        'invoice_payload' => true,
33
        'shipping_option_id' => true,
34
        'order_info' => OrderInfo::class
35
    ];
36
37
    /**
38
     * Unique query identifier
39
     *
40
     * @var string
41
     */
42
    protected $id;
43
44
    /**
45
     * User who sent the query
46
     *
47
     * @var User
48
     */
49
    protected $from;
50
51
    /**
52
     * Three-letter ISO 4217 currency code
53
     *
54
     * @var string
55
     */
56
    protected $currency;
57
58
    /**
59
     * Total price in the smallest units of the currency
60
     *
61
     * @var integer
62
     */
63
    protected $totalAmount;
64
65
    /**
66
     * Bot specified invoice payload
67
     *
68
     * @var string
69
     */
70
    protected $invoicePayload;
71
72
    /**
73
     * Optional. Identifier of the shipping option chosen by the user
74
     *
75
     * @var string
76
     */
77
    protected $shippingOptionId;
78
79
    /**
80
     * Optional. Order info provided by the user
81
     *
82
     * @var OrderInfo
83
     */
84
    protected $orderInfo;
85
86
    /**
87
     * @author MY
88
     * @return string
89
     */
90
    public function getId()
91
    {
92
        return $this->id;
93
    }
94
95
    /**
96
     * @author MY
97
     * @param string $id
98
     */
99
    public function setId($id)
100
    {
101
        $this->id = $id;
102
    }
103
104
    /**
105
     * @author MY
106
     * @return User
107
     */
108
    public function getFrom()
109
    {
110
        return $this->from;
111
    }
112
113
    /**
114
     * @author MY
115
     * @param User $from
116
     */
117
    public function setFrom($from)
118
    {
119
        $this->from = $from;
120
    }
121
122
    /**
123
     * @author MY
124
     * @return string
125
     */
126
    public function getCurrency()
127
    {
128
        return $this->currency;
129
    }
130
131
    /**
132
     * @author MY
133
     * @param string $currency
134
     */
135
    public function setCurrency($currency)
136
    {
137
        $this->currency = $currency;
138
    }
139
140
    /**
141
     * @author MY
142
     * @return int
143
     */
144
    public function getTotalAmount()
145
    {
146
        return $this->totalAmount;
147
    }
148
149
    /**
150
     * @author MY
151
     * @param int $totalAmount
152
     */
153
    public function setTotalAmount($totalAmount)
154
    {
155
        $this->totalAmount = $totalAmount;
156
    }
157
158
    /**
159
     * @author MY
160
     * @return mixed
161
     */
162
    public function getInvoicePayload()
163
    {
164
        return $this->invoicePayload;
165
    }
166
167
    /**
168
     * @author MY
169
     * @param mixed $invoicePayload
170
     */
171
    public function setInvoicePayload($invoicePayload)
172
    {
173
        $this->invoicePayload = $invoicePayload;
174
    }
175
176
    /**
177
     * @author MY
178
     * @return string
179
     */
180
    public function getShippingOptionId()
181
    {
182
        return $this->shippingOptionId;
183
    }
184
185
    /**
186
     * @author MY
187
     * @param string $shippingOptionId
188
     */
189
    public function setShippingOptionId($shippingOptionId)
190
    {
191
        $this->shippingOptionId = $shippingOptionId;
192
    }
193
194
    /**
195
     * @author MY
196
     * @return OrderInfo
197
     */
198
    public function getOrderInfo()
199
    {
200
        return $this->orderInfo;
201
    }
202
203
    /**
204
     * @author MY
205
     * @param OrderInfo $orderInfo
206
     */
207
    public function setOrderInfo($orderInfo)
208
    {
209
        $this->orderInfo = $orderInfo;
210
    }
211
}
212

src/Types/Payments/SuccessfulPayment.php 1 location

@@ 13-207 (lines=195) @@
10
 *
11
 * @package TelegramBot\Api\Types\Payments
12
 */
13
class SuccessfulPayment extends BaseType
14
{
15
    /**
16
     * @var array
17
     */
18
    static protected $requiredParams = ['currency', 'total_amount', 'invoice_payload', 'telegram_payment_charge_id', 'provider_payment_charge_id'];
19
20
    /**
21
     * @var array
22
     */
23
    static protected $map = [
24
        'currency' => true,
25
        'total_amount' => true,
26
        'invoice_payload' => true,
27
        'shipping_option_id' => true,
28
        'order_info' => OrderInfo::class,
29
        'telegram_payment_charge_id' => true,
30
        'provider_payment_charge_id' => true
31
    ];
32
33
    /**
34
     * Three-letter ISO 4217 currency code
35
     *
36
     * @var string
37
     */
38
    protected $currency;
39
40
    /**
41
     * Total price in the smallest units of the currency
42
     *
43
     * @var integer
44
     */
45
    protected $totalAmount;
46
47
    /**
48
     * Bot specified invoice payload
49
     *
50
     * @var array
51
     */
52
    protected $invoicePayload;
53
54
    /**
55
     * Optional. Identifier of the shipping option chosen by the user
56
     *
57
     * @var string
58
     */
59
    protected $shippingOptionId;
60
61
    /**
62
     * Optional. Order info provided by the user
63
     *
64
     * @var OrderInfo
65
     */
66
    protected $orderInfo;
67
68
    /**
69
     * 	Telegram payment identifier
70
     *
71
     * @var string
72
     */
73
    protected $telegramPaymentChargeId;
74
75
    /**
76
     * Provider payment identifier
77
     *
78
     * @var string
79
     */
80
    protected $providerPaymentChargeId;
81
82
    /**
83
     * @author MY
84
     * @return string
85
     */
86
    public function getCurrency()
87
    {
88
        return $this->currency;
89
    }
90
91
    /**
92
     * @author MY
93
     * @param string $currency
94
     */
95
    public function setCurrency($currency)
96
    {
97
        $this->currency = $currency;
98
    }
99
100
    /**
101
     * @author MY
102
     * @return int
103
     */
104
    public function getTotalAmount()
105
    {
106
        return $this->totalAmount;
107
    }
108
109
    /**
110
     * @author MY
111
     * @param int $totalAmount
112
     */
113
    public function setTotalAmount($totalAmount)
114
    {
115
        $this->totalAmount = $totalAmount;
116
    }
117
118
    /**
119
     * @author MY
120
     * @return array
121
     */
122
    public function getInvoicePayload()
123
    {
124
        return $this->invoicePayload;
125
    }
126
127
    /**
128
     * @author MY
129
     * @param array $invoicePayload
130
     */
131
    public function setInvoicePayload($invoicePayload)
132
    {
133
        $this->invoicePayload = $invoicePayload;
134
    }
135
136
    /**
137
     * @author MY
138
     * @return string
139
     */
140
    public function getShippingOptionId()
141
    {
142
        return $this->shippingOptionId;
143
    }
144
145
    /**
146
     * @author MY
147
     * @param string $shippingOptionId
148
     */
149
    public function setShippingOptionId($shippingOptionId)
150
    {
151
        $this->shippingOptionId = $shippingOptionId;
152
    }
153
154
    /**
155
     * @author MY
156
     * @return string
157
     */
158
    public function getTelegramPaymentChargeId()
159
    {
160
        return $this->telegramPaymentChargeId;
161
    }
162
163
    /**
164
     * @author MY
165
     * @param string $telegramPaymentChargeId
166
     */
167
    public function setTelegramPaymentChargeId($telegramPaymentChargeId)
168
    {
169
        $this->telegramPaymentChargeId = $telegramPaymentChargeId;
170
    }
171
172
    /**
173
     * @author MY
174
     * @return mixed
175
     */
176
    public function getProviderPaymentChargeId()
177
    {
178
        return $this->providerPaymentChargeId;
179
    }
180
181
    /**
182
     * @author MY
183
     * @param mixed $providerPaymentChargeId
184
     */
185
    public function setProviderPaymentChargeId($providerPaymentChargeId)
186
    {
187
        $this->providerPaymentChargeId = $providerPaymentChargeId;
188
    }
189
190
    /**
191
     * @author MY
192
     * @return OrderInfo
193
     */
194
    public function getOrderInfo()
195
    {
196
        return $this->orderInfo;
197
    }
198
199
    /**
200
     * @author MY
201
     * @param OrderInfo $orderInfo
202
     */
203
    public function setOrderInfo($orderInfo)
204
    {
205
        $this->orderInfo = $orderInfo;
206
    }
207
}
208