Skip to content

Commit

Permalink
update: Sync to Bot API 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirHkrg committed Dec 14, 2024
1 parent 7a2d54c commit ee8d4fe
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 4 deletions.
30 changes: 28 additions & 2 deletions src/Methode.php
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ public function sendInvoice($chat_id, $title, $description, $payload, $provider_
return $this->endpoint('sendInvoice', get_defined_vars());
}

public function createInvoiceLink($title, $description, $payload, $provider_token, $currency, $price, $max_tip_amount = null, $suggested_tip_amounts = null, $provider_data = null, $photo_url = null, $photo_size = null, $photo_width = null, $photo_height = null, $need_name = null, $need_phone_number = null, $need_email = null, $need_shipping_address = null, $send_phone_number_to_provider = null, $send_email_to_provider = null, $is_flexible = null): bool|string|array|null
public function createInvoiceLink($title, $description, $payload, $provider_token, $currency, $price, $subscription_period = null, $max_tip_amount = null, $suggested_tip_amounts = null, $provider_data = null, $photo_url = null, $photo_size = null, $photo_width = null, $photo_height = null, $need_name = null, $need_phone_number = null, $need_email = null, $need_shipping_address = null, $send_phone_number_to_provider = null, $send_email_to_provider = null, $is_flexible = null, $business_connection_id = null): bool|string|array|null
{
return $this->endpoint('createInvoiceLink', get_defined_vars());
}
Expand Down Expand Up @@ -683,4 +683,30 @@ public function editChatSubscriptionInviteLink($chat_id, $invite_link, $name = n
{
return $this->endpoint('editChatSubscriptionInviteLink', get_defined_vars());
}
}

public function editUserStarSubscription($user_id, $telegram_payment_charge_id, $is_canceled): bool|array|string
{
return $this->endpoint('editUserStarSubscription', get_defined_vars());
}

public function setUserEmojiStatus($user_id, $emoji_status_custom_emoji_id = null, $emoji_status_expiration_date = null): bool|array|string
{
return $this->endpoint('setUserEmojiStatus', get_defined_vars());
}

public function savePreparedInlineMessage($user_id, $result, $allow_user_chats = null, $allow_bot_chats = null, $allow_group_chats = null, $allow_channel_chats = null): bool|array|string
{
return $this->endpoint('savePreparedInlineMessage', get_defined_vars());
}

public function getAvailableGifts(): bool|array|string
{
return $this->endpoint('getAvailableGifts', get_defined_vars());
}

public function sendGift($user_id, $gift_id, $text = null, $text_parse_mode = null, $text_entities = null): bool|array|string
{
return $this->endpoint('sendGift', get_defined_vars());
}
}

13 changes: 13 additions & 0 deletions src/Updates/AffiliateInfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace LaraGram\Laraquest\Updates;

/**
* @property User $affiliate_user
* @property Chat $affiliate_chat
* @property int $commission_per_mille
* @property int $amount
* @property int $nanostar_amount
**/
class AffiliateInfo { }
13 changes: 13 additions & 0 deletions src/Updates/Gift.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace LaraGram\Laraquest\Updates;

/**
* @property int $id
* @property Sticker $sticker
* @property int $star_count
* @property int $total_count
* @property int $remaining_count
**/
class Gift { }
9 changes: 9 additions & 0 deletions src/Updates/Gifts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace LaraGram\Laraquest\Updates;

/**
* @property array $gifts
**/
class Gifts { }
10 changes: 10 additions & 0 deletions src/Updates/PreparedInlineMessage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace LaraGram\Laraquest\Updates;

/**
* @property string $id
* @property int $expiration_date
**/
class PreparedInlineMessage { }
1 change: 1 addition & 0 deletions src/Updates/StarTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/**
* @property string $id
* @property int $amount
* @property int $nanostar_amount
* @property int $date
* @property TransactionPartner $source
* @property TransactionPartner $receiver
Expand Down
6 changes: 4 additions & 2 deletions src/Updates/SuccessfulPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
* @property string $currency
* @property int $total_amount
* @property string $invoice_payload
* @property int $subscription_expiration_date
* @property bool $is_recurring
* @property bool $is_first_recurring
* @property string $shipping_option_id
* @property OrderInfo $order_info
* @property string $telegram_payment_charge_id
* @property string $provider_payment_charge_id
**/
**/
class SuccessfulPayment { }
11 changes: 11 additions & 0 deletions src/Updates/TransactionPartnerAffiliateProgram.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace LaraGram\Laraquest\Updates;

/**
* @property string $type
* @property User $sponsor_user
* @property int $commission_per_mille
**/
class TransactionPartnerAffiliateProgram { }
3 changes: 3 additions & 0 deletions src/Updates/TransactionPartnerUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
/**
* @property string $type
* @property User $user
* @property AffiliateInfo $affiliate
* @property string $invoice_payload
* @property int $subscription_period
* @property array $paid_media
* @property string $paid_media_payload
* @property Gift $gift
**/
class TransactionPartnerUser { }

0 comments on commit ee8d4fe

Please sign in to comment.