1 | <?php |
||
17 | class SendInvoice extends TelegramMethods |
||
18 | { |
||
19 | /** |
||
20 | * Unique identifier for the target private chat |
||
21 | * @var int |
||
22 | */ |
||
23 | public $chat_id = 0; |
||
24 | |||
25 | /** |
||
26 | * Product name |
||
27 | * @var string |
||
28 | */ |
||
29 | public $title = ''; |
||
30 | |||
31 | /** |
||
32 | * Product description |
||
33 | * @var string |
||
34 | */ |
||
35 | public $description = ''; |
||
36 | |||
37 | /** |
||
38 | * Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes |
||
39 | * @var string |
||
40 | */ |
||
41 | public $payload = ''; |
||
42 | |||
43 | /** |
||
44 | * Payments provider token, obtained via Botfather |
||
45 | * @var string |
||
46 | */ |
||
47 | public $provider_token = ''; |
||
48 | |||
49 | /** |
||
50 | * Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter |
||
51 | * @var string |
||
52 | */ |
||
53 | public $start_parameter = ''; |
||
54 | |||
55 | /** |
||
56 | * Three-letter ISO 4217 currency code, see more on currencies |
||
57 | * @see https://core.telegram.org/bots/payments#supported-currencies |
||
58 | * @var string |
||
59 | */ |
||
60 | public $currency = ''; |
||
61 | |||
62 | /** |
||
63 | * Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, |
||
64 | * etc.) |
||
65 | * @var LabeledPrice[] |
||
66 | */ |
||
67 | public $prices = []; |
||
68 | |||
69 | /** |
||
70 | * Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a |
||
71 | * service. People like it better when they see what they are paying for |
||
72 | * @var string |
||
73 | */ |
||
74 | public $photo_url = ''; |
||
75 | |||
76 | /** |
||
77 | * Optional. Photo size |
||
78 | * @var int |
||
79 | */ |
||
80 | public $photo_size = 0; |
||
81 | |||
82 | /** |
||
83 | * Optional. Photo width |
||
84 | * @var int |
||
85 | */ |
||
86 | public $photo_width = 0; |
||
87 | |||
88 | /** |
||
89 | * Optional. Photo height |
||
90 | * @var int |
||
91 | */ |
||
92 | public $photo_height = 0; |
||
93 | |||
94 | /** |
||
95 | * Optional. Pass True, if you require the user's full name to complete the order |
||
96 | * @var bool |
||
97 | */ |
||
98 | public $need_name = false; |
||
99 | |||
100 | /** |
||
101 | * Optional. Pass True, if you require the user's phone number to complete the order |
||
102 | * @var bool |
||
103 | */ |
||
104 | public $need_phone_number = false; |
||
105 | |||
106 | /** |
||
107 | * Optional. Pass True, if you require the user's email to complete the order |
||
108 | * @var bool |
||
109 | */ |
||
110 | public $need_email = false; |
||
111 | |||
112 | /** |
||
113 | * Optional. Pass True, if you require the user's shipping address to complete the order |
||
114 | * @var bool |
||
115 | */ |
||
116 | public $need_shipping_address = false; |
||
117 | |||
118 | /** |
||
119 | * Optional. Pass True, if the final price depends on the shipping method |
||
120 | * @var bool |
||
121 | */ |
||
122 | public $is_flexible = false; |
||
123 | |||
124 | /** |
||
125 | * Optional. Sends the message silently. Users will receive a notification with no sound. |
||
126 | * @var bool |
||
127 | */ |
||
128 | public $disable_notification = false; |
||
129 | |||
130 | /** |
||
131 | * Optional. If the message is a reply, ID of the original message |
||
132 | * @var int |
||
133 | */ |
||
134 | public $reply_to_message_id = 0; |
||
135 | |||
136 | /** |
||
137 | * Optional. A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. |
||
138 | * If not empty, the first button must be a Pay button |
||
139 | * @var Markup |
||
140 | */ |
||
141 | public $reply_markup; |
||
142 | |||
143 | /** |
||
144 | * Prices must be an array of objects, so json_encode() them |
||
145 | * |
||
146 | * @see https://github.com/unreal4u/telegram-api/issues/32 |
||
147 | * @return TelegramMethods |
||
148 | */ |
||
149 | 1 | public function performSpecialConditions(): TelegramMethods |
|
157 | |||
158 | 1 | public function getMandatoryFields(): array |
|
171 | } |
||
172 |