from ....tl.tlobject import TLObject


class GetPaymentReceiptRequest(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    payments.getPaymentReceipt#a092a980 msg_id:int = payments.PaymentReceipt"""

    # Telegram's constructor (U)ID for this class
    constructor_id = 0xa092a980
    # Also the ID of its resulting type for fast checks
    subclass_of_id = 0x590093c9

    def __init__(self, msg_id):
        """
        :param msg_id: Telegram type: "int".

        :returns payments.PaymentReceipt: Instance of PaymentReceipt.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.msg_id = msg_id

    def to_dict(self):
        return {
            'msg_id': self.msg_id,
        }

    def on_send(self, writer):
        writer.write_int(GetPaymentReceiptRequest.constructor_id, signed=False)
        writer.write_int(self.msg_id)

    @staticmethod
    def empty():
        """Returns an "empty" instance (attributes=None)"""
        return GetPaymentReceiptRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'payments.getPaymentReceipt#a092a980 msg_id:int = payments.PaymentReceipt'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)
