ShippingQuery   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 93
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
dl 0
loc 93
rs 10
c 1
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setFrom() 0 3 1
A getId() 0 3 1
A getFrom() 0 3 1
A setId() 0 3 1
A setInvoicePayload() 0 3 1
A setShippingAddress() 0 3 1
A getShippingAddress() 0 3 1
A getInvoicePayload() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\Shipping;
6
7
use Zanzara\Telegram\Type\User;
8
9
/**
10
 * This object contains information about an incoming shipping query.
11
 *
12
 * More on https://core.telegram.org/bots/api#shippingquery
13
 */
14
class ShippingQuery
15
{
16
17
    /**
18
     * Unique query identifier
19
     *
20
     * @var string
21
     */
22
    private $id;
23
24
    /**
25
     * User who sent the query
26
     *
27
     * @var User
28
     */
29
    private $from;
30
31
    /**
32
     * Bot specified invoice payload
33
     *
34
     * @var string
35
     */
36
    private $invoice_payload;
37
38
    /**
39
     * User specified shipping address
40
     *
41
     * @var ShippingAddress
42
     */
43
    private $shipping_address;
44
45
    /**
46
     * @return string
47
     */
48
    public function getId(): string
49
    {
50
        return $this->id;
51
    }
52
53
    /**
54
     * @param string $id
55
     */
56
    public function setId(string $id): void
57
    {
58
        $this->id = $id;
59
    }
60
61
    /**
62
     * @return User
63
     */
64
    public function getFrom(): User
65
    {
66
        return $this->from;
67
    }
68
69
    /**
70
     * @param User $from
71
     */
72
    public function setFrom(User $from): void
73
    {
74
        $this->from = $from;
75
    }
76
77
    /**
78
     * @return string
79
     */
80
    public function getInvoicePayload(): string
81
    {
82
        return $this->invoice_payload;
83
    }
84
85
    /**
86
     * @param string $invoice_payload
87
     */
88
    public function setInvoicePayload(string $invoice_payload): void
89
    {
90
        $this->invoice_payload = $invoice_payload;
91
    }
92
93
    /**
94
     * @return ShippingAddress
95
     */
96
    public function getShippingAddress(): ShippingAddress
97
    {
98
        return $this->shipping_address;
99
    }
100
101
    /**
102
     * @param ShippingAddress $shipping_address
103
     */
104
    public function setShippingAddress(ShippingAddress $shipping_address): void
105
    {
106
        $this->shipping_address = $shipping_address;
107
    }
108
109
}