InputStorePaymentPremiumGiftCode.deserialize constructor
InputStorePaymentPremiumGiftCode.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory InputStorePaymentPremiumGiftCode.deserialize(BinaryReader reader) {
// Read [InputStorePaymentPremiumGiftCode] fields.
final flags = reader.readInt32();
final users = reader.readVectorObject<InputUserBase>();
final hasBoostPeerField = (flags & 1) != 0;
final boostPeer =
hasBoostPeerField ? reader.readObject() as InputPeerBase : null;
final currency = reader.readString();
final amount = reader.readInt64();
// Construct [InputStorePaymentPremiumGiftCode] object.
final returnValue = InputStorePaymentPremiumGiftCode(
users: users,
boostPeer: boostPeer,
currency: currency,
amount: amount,
);
// Now return the deserialized [InputStorePaymentPremiumGiftCode].
return returnValue;
}