diff --git a/lib/telegram/bot/types/background_fill_freeform_gradient.rb b/lib/telegram/bot/types/background_fill_freeform_gradient.rb index 9ebef50..de2919f 100644 --- a/lib/telegram/bot/types/background_fill_freeform_gradient.rb +++ b/lib/telegram/bot/types/background_fill_freeform_gradient.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class BackgroundFillFreeformGradient < Base - attribute :type, Types::String.default('freeform_gradient') + attribute :type, Types::String.constrained(eql: 'freeform_gradient').default('freeform_gradient') attribute :colors, Types::Array.of(Types::Integer) end end diff --git a/lib/telegram/bot/types/background_fill_gradient.rb b/lib/telegram/bot/types/background_fill_gradient.rb index 79595ed..01ab0fe 100644 --- a/lib/telegram/bot/types/background_fill_gradient.rb +++ b/lib/telegram/bot/types/background_fill_gradient.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class BackgroundFillGradient < Base - attribute :type, Types::String.default('gradient') + attribute :type, Types::String.constrained(eql: 'gradient').default('gradient') attribute :top_color, Types::Integer attribute :bottom_color, Types::Integer attribute :rotation_angle, Types::Integer diff --git a/lib/telegram/bot/types/background_fill_solid.rb b/lib/telegram/bot/types/background_fill_solid.rb index 4c65523..5a14631 100644 --- a/lib/telegram/bot/types/background_fill_solid.rb +++ b/lib/telegram/bot/types/background_fill_solid.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class BackgroundFillSolid < Base - attribute :type, Types::String.default('solid') + attribute :type, Types::String.constrained(eql: 'solid').default('solid') attribute :color, Types::Integer end end diff --git a/lib/telegram/bot/types/background_type_chat_theme.rb b/lib/telegram/bot/types/background_type_chat_theme.rb index 612fef0..ca2051a 100644 --- a/lib/telegram/bot/types/background_type_chat_theme.rb +++ b/lib/telegram/bot/types/background_type_chat_theme.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class BackgroundTypeChatTheme < Base - attribute :type, Types::String.default('chat_theme') + attribute :type, Types::String.constrained(eql: 'chat_theme').default('chat_theme') attribute :theme_name, Types::String end end diff --git a/lib/telegram/bot/types/background_type_fill.rb b/lib/telegram/bot/types/background_type_fill.rb index 47aae7c..8c9e359 100644 --- a/lib/telegram/bot/types/background_type_fill.rb +++ b/lib/telegram/bot/types/background_type_fill.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class BackgroundTypeFill < Base - attribute :type, Types::String.default('fill') + attribute :type, Types::String.constrained(eql: 'fill').default('fill') attribute :fill, BackgroundFill attribute :dark_theme_dimming, Types::Integer end diff --git a/lib/telegram/bot/types/background_type_pattern.rb b/lib/telegram/bot/types/background_type_pattern.rb index 68e4c6e..b1801a7 100644 --- a/lib/telegram/bot/types/background_type_pattern.rb +++ b/lib/telegram/bot/types/background_type_pattern.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class BackgroundTypePattern < Base - attribute :type, Types::String.default('pattern') + attribute :type, Types::String.constrained(eql: 'pattern').default('pattern') attribute :document, Document attribute :fill, BackgroundFill attribute :intensity, Types::Integer diff --git a/lib/telegram/bot/types/background_type_wallpaper.rb b/lib/telegram/bot/types/background_type_wallpaper.rb index 0ead919..2827217 100644 --- a/lib/telegram/bot/types/background_type_wallpaper.rb +++ b/lib/telegram/bot/types/background_type_wallpaper.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class BackgroundTypeWallpaper < Base - attribute :type, Types::String.default('wallpaper') + attribute :type, Types::String.constrained(eql: 'wallpaper').default('wallpaper') attribute :document, Document attribute :dark_theme_dimming, Types::Integer attribute? :is_blurred, Types::True diff --git a/lib/telegram/bot/types/input_paid_media_photo.rb b/lib/telegram/bot/types/input_paid_media_photo.rb index e791867..24bfdb4 100644 --- a/lib/telegram/bot/types/input_paid_media_photo.rb +++ b/lib/telegram/bot/types/input_paid_media_photo.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class InputPaidMediaPhoto < Base - attribute :type, Types::String.default('photo') + attribute :type, Types::String.constrained(eql: 'photo').default('photo') attribute :media, Types::String end end diff --git a/lib/telegram/bot/types/input_paid_media_video.rb b/lib/telegram/bot/types/input_paid_media_video.rb index 3762775..bf50aaa 100644 --- a/lib/telegram/bot/types/input_paid_media_video.rb +++ b/lib/telegram/bot/types/input_paid_media_video.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class InputPaidMediaVideo < Base - attribute :type, Types::String.default('video') + attribute :type, Types::String.constrained(eql: 'video').default('video') attribute :media, Types::String attribute? :thumbnail, Types::String attribute? :width, Types::Integer diff --git a/lib/telegram/bot/types/paid_media_preview.rb b/lib/telegram/bot/types/paid_media_preview.rb index 63d8e67..045bf73 100644 --- a/lib/telegram/bot/types/paid_media_preview.rb +++ b/lib/telegram/bot/types/paid_media_preview.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class PaidMediaPreview < Base - attribute :type, Types::String.default('preview') + attribute :type, Types::String.constrained(eql: 'preview').default('preview') attribute? :width, Types::Integer attribute? :height, Types::Integer attribute? :duration, Types::Integer diff --git a/lib/telegram/bot/types/paid_media_video.rb b/lib/telegram/bot/types/paid_media_video.rb index a417679..564f3c0 100644 --- a/lib/telegram/bot/types/paid_media_video.rb +++ b/lib/telegram/bot/types/paid_media_video.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class PaidMediaVideo < Base - attribute :type, Types::String.default('video') + attribute :type, Types::String.constrained(eql: 'video').default('video') attribute :video, Video end end diff --git a/lib/telegram/bot/types/refunded_payment.rb b/lib/telegram/bot/types/refunded_payment.rb index 7e3eff9..c33b248 100644 --- a/lib/telegram/bot/types/refunded_payment.rb +++ b/lib/telegram/bot/types/refunded_payment.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class RefundedPayment < Base - attribute :currency, Types::String.default('XTR') + attribute :currency, Types::String.constrained(eql: 'XTR').default('XTR') attribute :total_amount, Types::Integer attribute :invoice_payload, Types::String attribute :telegram_payment_charge_id, Types::String diff --git a/lib/telegram/bot/types/transaction_partner_fragment.rb b/lib/telegram/bot/types/transaction_partner_fragment.rb index c597d80..029a3d8 100644 --- a/lib/telegram/bot/types/transaction_partner_fragment.rb +++ b/lib/telegram/bot/types/transaction_partner_fragment.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class TransactionPartnerFragment < Base - attribute :type, Types::String.default('fragment') + attribute :type, Types::String.constrained(eql: 'fragment').default('fragment') attribute? :withdrawal_state, RevenueWithdrawalState end end diff --git a/lib/telegram/bot/types/transaction_partner_other.rb b/lib/telegram/bot/types/transaction_partner_other.rb index 40c5f83..f7dfc12 100644 --- a/lib/telegram/bot/types/transaction_partner_other.rb +++ b/lib/telegram/bot/types/transaction_partner_other.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class TransactionPartnerOther < Base - attribute :type, Types::String.default('other') + attribute :type, Types::String.constrained(eql: 'other').default('other') end end end diff --git a/lib/telegram/bot/types/transaction_partner_telegram_ads.rb b/lib/telegram/bot/types/transaction_partner_telegram_ads.rb index 3f5bdaf..955039d 100644 --- a/lib/telegram/bot/types/transaction_partner_telegram_ads.rb +++ b/lib/telegram/bot/types/transaction_partner_telegram_ads.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class TransactionPartnerTelegramAds < Base - attribute :type, Types::String.default('telegram_ads') + attribute :type, Types::String.constrained(eql: 'telegram_ads').default('telegram_ads') end end end diff --git a/lib/telegram/bot/types/transaction_partner_user.rb b/lib/telegram/bot/types/transaction_partner_user.rb index 77b16e0..0759ce3 100644 --- a/lib/telegram/bot/types/transaction_partner_user.rb +++ b/lib/telegram/bot/types/transaction_partner_user.rb @@ -4,7 +4,7 @@ module Telegram module Bot module Types class TransactionPartnerUser < Base - attribute :type, Types::String.default('user') + attribute :type, Types::String.constrained(eql: 'user').default('user') attribute :user, User attribute? :invoice_payload, Types::String attribute? :paid_media, Types::Array