Beispiel #1
0
        public override TLObject FromBytes(byte[] bytes, ref int position)
        {
            bytes.ThrowExceptionIfIncorrect(ref position, Signature);

            Flags      = GetObject <TLInt>(bytes, ref position);
            _savedInfo = GetObject <TLPaymentRequestedInfo>(Flags, (int)SavedInfoFlags.SavedInfo, null, bytes, ref position);

            return(this);
        }
        public override TLObject FromStream(Stream input)
        {
            Flags             = GetObject <TLInt>(input);
            Currency          = GetObject <TLString>(input);
            TotalAmount       = GetObject <TLLong>(input);
            Payload           = GetObject <TLString>(input);
            _info             = GetObject <TLPaymentRequestedInfo>(Flags, (int)MessageActionPaymentSentMeFlags.Info, null, input);
            _shippingOptionId = GetObject <TLString>(Flags, (int)MessageActionPaymentSentMeFlags.ShippingOptionId, null, input);
            Charge            = GetObject <TLPaymentCharge>(input);

            return(this);
        }
        public override TLObject FromBytes(byte[] bytes, ref int position)
        {
            bytes.ThrowExceptionIfIncorrect(ref position, Signature);

            Flags             = GetObject <TLInt>(bytes, ref position);
            Currency          = GetObject <TLString>(bytes, ref position);
            TotalAmount       = GetObject <TLLong>(bytes, ref position);
            Payload           = GetObject <TLString>(bytes, ref position);
            _info             = GetObject <TLPaymentRequestedInfo>(Flags, (int)MessageActionPaymentSentMeFlags.Info, null, bytes, ref position);
            _shippingOptionId = GetObject <TLString>(Flags, (int)MessageActionPaymentSentMeFlags.ShippingOptionId, null, bytes, ref position);
            Charge            = GetObject <TLPaymentCharge>(bytes, ref position);

            return(this);
        }
        public override TLObject FromBytes(byte[] bytes, ref int position)
        {
            bytes.ThrowExceptionIfIncorrect(ref position, Signature);

            Flags             = GetObject <TLInt>(bytes, ref position);
            BotId             = GetObject <TLInt>(bytes, ref position);
            Invoice           = GetObject <TLInvoice>(bytes, ref position);
            ProviderId        = GetObject <TLInt>(bytes, ref position);
            Url               = GetObject <TLString>(bytes, ref position);
            _nativeProvider   = GetObject <TLString>(Flags, (int)PaymentFormFlags.Native, null, bytes, ref position);
            _nativeParams     = GetObject <TLDataJSON>(Flags, (int)PaymentFormFlags.Native, null, bytes, ref position);
            _savedInfo        = GetObject <TLPaymentRequestedInfo>(Flags, (int)PaymentFormFlags.SavedInfo, null, bytes, ref position);
            _savedCredentials = GetObject <TLPaymentSavedCredentials>(Flags, (int)PaymentFormFlags.SavedCredentials, null, bytes, ref position);
            Users             = GetObject <TLVector <TLUserBase> >(bytes, ref position);

            return(this);
        }
        public override TLObject FromBytes(byte[] bytes, ref int position)
        {
            bytes.ThrowExceptionIfIncorrect(ref position, Signature);

            Flags            = GetObject <TLInt>(bytes, ref position);
            Date             = GetObject <TLInt>(bytes, ref position);
            BotId            = GetObject <TLInt>(bytes, ref position);
            Invoice          = GetObject <TLInvoice>(bytes, ref position);
            ProviderId       = GetObject <TLInt>(bytes, ref position);
            _info            = GetObject <TLPaymentRequestedInfo>(Flags, (int)PaymentReceiptFlags.Info, null, bytes, ref position);
            _shipping        = GetObject <TLShippingOption>(Flags, (int)PaymentReceiptFlags.Shipping, null, bytes, ref position);
            Currency         = GetObject <TLString>(bytes, ref position);
            TotalAmount      = GetObject <TLLong>(bytes, ref position);
            CredentialsTitle = GetObject <TLString>(bytes, ref position);
            Users            = GetObject <TLVector <TLUserBase> >(bytes, ref position);

            return(this);
        }