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