// <auto-generated/>
// ReSharper disable All

namespace MyTelegram.Schema;

///<summary>
/// Represents an additional payment method
/// See <a href="https://corefork.telegram.org/constructor/paymentFormMethod" />
///</summary>
[TlObject(0x88f8f21b)]
public sealed class TPaymentFormMethod : IPaymentFormMethod
{
    public uint ConstructorId => 0x88f8f21b;
    ///<summary>
    /// URL to open in a webview to process the payment
    ///</summary>
    public string Url { get; set; }

    ///<summary>
    /// Payment method description
    ///</summary>
    public string Title { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Url);
        writer.Write(Title);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Url = buffer.ReadString();
        Title = buffer.ReadString();
    }
}