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

namespace MyTelegram.Schema;

///<summary>
/// Payment identifier
/// See <a href="https://corefork.telegram.org/constructor/paymentCharge" />
///</summary>
[TlObject(0xea02c27e)]
public sealed class TPaymentCharge : IPaymentCharge
{
    public uint ConstructorId => 0xea02c27e;
    ///<summary>
    /// Telegram payment identifier
    ///</summary>
    public string Id { get; set; }

    ///<summary>
    /// Provider payment identifier
    ///</summary>
    public string ProviderChargeId { get; set; }

    public void ComputeFlag()
    {

    }

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

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