MessageInvoice.fromJson constructor

MessageInvoice.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory MessageInvoice.fromJson(Map<String, dynamic> json) => MessageInvoice(
      title: json['title'],
      description: FormattedText.fromJson(json['description']),
      photo: json['photo'] == null ? null : Photo.fromJson(json['photo']),
      currency: json['currency'],
      totalAmount: json['total_amount'],
      startParameter: json['start_parameter'],
      isTest: json['is_test'],
      needShippingAddress: json['need_shipping_address'],
      receiptMessageId: json['receipt_message_id'],
      extendedMedia: json['extended_media'] == null
          ? null
          : MessageExtendedMedia.fromJson(json['extended_media']),
    );