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

namespace MyTelegram.Schema.Payments;

///<summary>
/// Informs server about a purchase made through the Play Store: for official applications only.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 DATA_JSON_INVALID The provided JSON data is invalid.
/// See <a href="https://corefork.telegram.org/method/payments.assignPlayMarketTransaction" />
///</summary>
[TlObject(0xdffd50d3)]
public sealed class RequestAssignPlayMarketTransaction : IRequest<MyTelegram.Schema.IUpdates>
{
    public uint ConstructorId => 0xdffd50d3;
    ///<summary>
    /// Receipt
    /// See <a href="https://corefork.telegram.org/type/DataJSON" />
    ///</summary>
    public MyTelegram.Schema.IDataJSON Receipt { get; set; }

    ///<summary>
    /// Payment purpose
    /// See <a href="https://corefork.telegram.org/type/InputStorePaymentPurpose" />
    ///</summary>
    public MyTelegram.Schema.IInputStorePaymentPurpose Purpose { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Receipt = buffer.Read<MyTelegram.Schema.IDataJSON>();
        Purpose = buffer.Read<MyTelegram.Schema.IInputStorePaymentPurpose>();
    }
}
