mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-06 23:15:16 +00:00
parent
0d55940c12
commit
133b9fdf6c
784 changed files with 17201 additions and 10048 deletions
80
TeleSharp.TL/TL/TLPaymentRequestedInfo.cs
Normal file
80
TeleSharp.TL/TL/TLPaymentRequestedInfo.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TeleSharp.TL;
|
||||
namespace TeleSharp.TL
|
||||
{
|
||||
[TLObject(-1868808300)]
|
||||
public class TLPaymentRequestedInfo : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1868808300;
|
||||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public string name { get; set; }
|
||||
public string phone { get; set; }
|
||||
public string email { get; set; }
|
||||
public TLPostAddress shipping_address { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = name != null ? (flags | 1) : (flags & ~1);
|
||||
flags = phone != null ? (flags | 2) : (flags & ~2);
|
||||
flags = email != null ? (flags | 4) : (flags & ~4);
|
||||
flags = shipping_address != null ? (flags | 8) : (flags & ~8);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
if ((flags & 1) != 0)
|
||||
name = StringUtil.Deserialize(br);
|
||||
else
|
||||
name = null;
|
||||
|
||||
if ((flags & 2) != 0)
|
||||
phone = StringUtil.Deserialize(br);
|
||||
else
|
||||
phone = null;
|
||||
|
||||
if ((flags & 4) != 0)
|
||||
email = StringUtil.Deserialize(br);
|
||||
else
|
||||
email = null;
|
||||
|
||||
if ((flags & 8) != 0)
|
||||
shipping_address = (TLPostAddress)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
shipping_address = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
if ((flags & 1) != 0)
|
||||
StringUtil.Serialize(name, bw);
|
||||
if ((flags & 2) != 0)
|
||||
StringUtil.Serialize(phone, bw);
|
||||
if ((flags & 4) != 0)
|
||||
StringUtil.Serialize(email, bw);
|
||||
if ((flags & 8) != 0)
|
||||
ObjectUtils.SerializeObject(shipping_address, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue