InputInvoiceMessageContent.fromJson constructor
Constructs an InputInvoiceMessageContent object from a JSON map
Implementation
factory InputInvoiceMessageContent.fromJson(Map<String, dynamic> json) {
return InputInvoiceMessageContent(
title: json['title'] as String,
description: json['description'] as String,
payload: json['payload'] as String,
providerToken: json['provider_token'] as String?,
currency: json['currency'] as String,
prices: (json['prices'] as List<dynamic>)
.map((e) => LabeledPrice.fromJson(e as Map<String, dynamic>))
.toList(),
maxTipAmount: json['max_tip_amount'] as int?,
suggestedTipAmounts: (json['suggested_tip_amounts'] as List<dynamic>?)
?.map((e) => e as int)
.toList(),
providerData: json['provider_data'] as String?,
photoUrl: json['photo_url'] as String?,
photoSize: json['photo_size'] as int?,
photoWidth: json['photo_width'] as int?,
photoHeight: json['photo_height'] as int?,
needName: json['need_name'] as bool?,
needPhoneNumber: json['need_phone_number'] as bool?,
needEmail: json['need_email'] as bool?,
needShippingAddress: json['need_shipping_address'] as bool?,
sendPhoneNumberToProvider: json['send_phone_number_to_provider'] as bool?,
sendEmailToProvider: json['send_email_to_provider'] as bool?,
isFlexible: json['is_flexible'] as bool?,
);
}